Вопрос

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.

Это было полезно?

Решение

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

Live demo.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top