I just read this article: https://developer.mozilla.org/en/HTTP_Caching_FAQ
There is firefox behavior (and some other browsers that I think), I would like to understand:
if I take any web page and try to insert the same image several times in javascript, the image only loads ONCE, even if I specify all the necessary headers to say "never use cache". (see article)
I know there are workarounds (for example, addind query strings to the end of URLs, etc.) , but why does Firefox work like this if I say that the image does not need to be cached, why the image is still taken from the cache when Am I trying to reinsert it?
Also, what cache is used for this? (I think it's a memory cache)
Is this behavior the same for dynamic inclusion, for example? ANSWSER NO :) I just tested it, and the same headers for the js script will make firefox redownload it every time you add a script to the DOM.
PS: I know that you're wondering WHY I should do this (adding the same image several times and forcing reuse, but this is how our application works)
Thank you
Good answer: firefox will store images for the current page load in the memory cache, even if you specify that it should not cache them.
You cannot change this behavior, but it is odd because it is not the same for javascript files, for example
Can someone explain or link a document describing how firefox cache works?