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:
location.reload(true);
Otherwise the "traditional" way is to add a random querystring onto the end
'...?rnd=' + Math.random();
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With