I need to reload the browser window with a new URL which also will replace/flush content and force reload of the page. window.replace() or window.location doesn't work, any other function I could use ?
+2
A:
location.href="http://www.example.com";
There is also
location.replace="http://www.example.com";
The latter doesn't mess with the browser history.
Ólafur Waage
2009-03-09 23:49:28
+4
A:
This should do it:
window.location.replace("http://example.com/");
Other ways (but not replacing):
window.location.href = "http://example.com/";
window.location.assign("http://example.com/");
Gumbo
2009-03-09 23:51:10
A:
You meen if I use Ajax navigation. I can use this code. and i will be able to use back button to navigate the previous page?
Aziz
2009-03-10 06:09:21