admin管理员组文章数量:1419253
I have a question, I'm opening a pop-up window using javascript then a window pops-up, there I make changes to the css file, when I click on close the following javascript is being used to refresh the window opener page
window.opener.location.reload();
window.close();
But the css remains cached in the browser, after the next refresh this only disappears. Is there a way I can hard refresh the opener page using javascript?
I have a question, I'm opening a pop-up window using javascript then a window pops-up, there I make changes to the css file, when I click on close the following javascript is being used to refresh the window opener page
window.opener.location.reload();
window.close();
But the css remains cached in the browser, after the next refresh this only disappears. Is there a way I can hard refresh the opener page using javascript?
Share Improve this question asked Nov 5, 2009 at 9:56 ElitmiarElitmiar 37k77 gold badges182 silver badges233 bronze badges3 Answers
Reset to default 5Documentation is great: MDC - window.location
reload(forceget)
Reload the document from the current URL. forceget is a boolean, which, when it is true, >causes the page to always be reloaded from the server. If it is false or not specified, the >browser may reload the page from its cache.
Try adding a parameter to the CSS file URL:
mystyles.css?12345
Most browsers do a plete reload of URLs with parameters.
But make sure, you remove that, when your site goes into production mode!
Try the following:
window.opener.location.href=window.opener.location;
window.close();
本文标签: Hard refreshing a page with JavascriptStack Overflow
版权声明:本文标题:Hard refreshing a page with Javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745294238a2651979.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论