I am refreshing images via attr('src', newimage), where newimage may point to one of several images and may already be cached by the browser. Unfortunately the browser cache is being completely ignored when requesting through this method.
All images in this example are indeed being cached by the browser. When initially fetched from the server, the server returns correct 'Cache-Control', 'Last-Modified' and 'Etag' headers. When running attr('src', newimage) with jQuery, the initiated request neither checks the browser cache, nor sends the request headers 'If-Modified-Since' and 'If-None-Match' :(
Does anybody know how to tell jQuery to check the browser cache before sending a request to the server?
BTW, I am using jQuery 1.7.1