Does location.replace () not get the conditional code if the last caching is done?

Here's what I see: I have a conditional-get caching policy (cache control: private, must-revalidate).

It works fine if I am on the page and then try to hit the browser refresh button.

However, in another part of my site, I use location.replace (url) to navigate to that page ... if I do that, it doesn't mean check and always fetch the cached version.

Any tips on what might be wrong here?

+1


source to share


2 answers


you can force disable the version by doing location.replace(url + "?tid=" + Math.random())



+1


source


Try a regular link. If you get the same result, then the problem is not JavaScript.



+1


source







All Articles