views:

153

answers:

2

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

It works fine if I'm on the page, then try to hit the browser's refresh button.

However, in another part of my site, I use location.replace(url) to go to that page... if I do that, its not makign that check and always retrieving the cached version.

Any tips on what might be wrong here?

+1  A: 

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

Martijn Laarman
Doesn't really work if you already have an URL with parameters in it.
Rene Saarsoo
+1  A: 

Try with an ordinary link. If you get the same result, then the problem is not in JavaScript.

Rene Saarsoo