I'm using window.open in a function to open a web page, which displays help for the current page.
The pages URL are stored in DB , some pages need authentication.
For these pages, the first time we call them the user has to authenticate, but if he closes the page and opens it another time , it's the cached page that is displayed.
I've try to add the time to the url, in order to not display the cached page
var oDate = new Date();
window.open(url+oDate.getTime());
But the browser is still displaying the cached url.
Any idea to resolve this problem?
Thanks.
You may want to try explicitly adding meta tags to your page:
<!-- HTTP 1.1 -->
<meta http-equiv="Cache-Control" content="no-store"/>
<!-- HTTP 1.0 -->
<meta http-equiv="Pragma" content="no-cache"/>
<!-- Prevents caching at the Proxy Server -->
<meta http-equiv="Expires" content="0"/>
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