I need the client (using javascript) to invalidate a page it has and essentially fetch a new version?
I thought I could do it all with headers: Invalidating cached content, If-Modified Headers?
If there NO way to have the browser refresh its current cached version, with out making a new request (via a new URL) ... so that the same original URL request could be used to see the updated content?
If you want to reload the current page you can do:
Otherwise the "traditional" way is to add a random querystring onto the end
what I did is pass a random parameter in the url. ie if I need to fetch products.php I call it with products.php?rand=23443545. This way the cache doesn't interfere.
You can't do that with javascript, to solve your problem or use method POST instead of GET or use nocache random parameter trick:
If you want more information, see: Is it possible to cache POST methods in HTTP?
When you reference the page, add a random variable on to the end. For instance:
That will ensure a non cached version. I recommend using javascript generated guids.