tags:

views:

97

answers:

3

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?

+1  A: 

Try the following:

window.opener.location.href=window.opener.location;
window.close();
Himadri
+2  A: 

Try adding a parameter to the CSS file URL:

mystyles.css?12345

Most browsers do a complete reload of URLs with parameters.

But make sure, you remove that, when your site goes into production mode!

DR
+2  A: 

Documentation 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.

epascarello