Some clarifications about cache-control
Posted: Sun Mar 08, 2009 12:38 am
I'm building a website which dynamically creates javascript files. I want these files to be cached by the browser but I want them to always revalidate whether the files are updated since caching or not. These means that I must use "Cache-control: must-revalidate". My questions are: How long will the browser cache the files since I haven't added any max-age there (Actually, I want those files to stay cached until those files were updated)? And how will the browser revalidate whether a file is updated or not? Is it simply looking at the Last modified header information of the file? And if it detected that the Last modified header information predates the time of caching, it will just abort fetching the file?