I'm using images generated by Drupal (drupal 7) to feed an application. I'm then caching those images in the app. I'm trying to figure out a way to determine if the image has been updated since the last download, is there anyway to access this information about an image, without actually loading the image?

1 Answer 1


You can use ETags - when the app receives an image, there will be an HTTP header that looks like:

ETag: "686897696a7c876b7e"

Whenever the app wants to check for a new image, perform a GET request with this header:

If-None-Match: "686897696a7c876b7e"

If the file is unchanged, your web server will respond with HTTP 304 Not Modified status.

  • got it to work, just an fyi for anyone trying to do this you need to pass the quotes ie; '"686897696a7c876b7e"'
    – user379468
    Oct 7, 2011 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.