PDA

View Full Version : How to change the url in the address bar with javascript?



dolittle
22 Aug 2007, 3:39 AM
Hi

Is there a way to change the url in the address bar without affecting the browser history?
YUI history manager uses the location.hash property but it adds the url+hash to the history.

Attacking my problem from the other direction. Is there a way changing the url of an iframe without affecting the browser history?
I want my iframe to show www.example1.com and then to change to www.example2.com.
I tried location.href but the new page was added to the history.

Thanks

ApocalypseCow
22 Aug 2007, 4:18 AM
try window.location.replace instead, I believe this doesn't create a history entry.

dolittle
22 Aug 2007, 5:07 AM
It works =D>

Thanks!!!

chuvaekbal
6 Feb 2013, 9:01 AM
I BET YOU ARE MAKING A PHISHING WEBSITE, DON'T YOU? :)):D:D:D:D:D:D:D:D:D=D>=D>=D>

xemphimhd
14 Aug 2013, 10:18 PM
Thank you!

Xem Phim HD (http://xemphimhdmienphi.seonhatnghe.com) | Xem Phim HD Mien Phi (http://xemphimhdmienphi.seonhatnghe.com)