Domanda

I'm developing a small application in C# to change the background image with images from the web.

Since I would like to avoid unused requests as much as possible, I would like to know if it's possible to request just the contenttype (and the image size) without actually downloading the image.

È stato utile?

Soluzione

instead of a GET request, you should try to use a HEAD request.

Live demo.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top