Click to See Complete Forum and Search --> : Replace/delete URL in Browser History List
rch123
12-02-2006, 08:46 AM
Hi
I have an url (xn--9a.com) that is re-directed to another name. When the user enters xn--9a.com, however, I want the other (re-directed to) domain to show in the Browser History List* and not xn--9a.com.
(*The Browser History List is the drop-down box of 25 or so recently visited url's).
So to recap, I am looking for the 're-directed to' url to be shown in the BHL record and not xn--9a.com. Either that, or no url is to be recorded/shown at all.
Regards,
See if this helps
window.location.replace("redirectedpage")
redirectedpage would replace the current page in the history list
ray326
12-02-2006, 10:10 PM
I'd be really surprised if that worked considering how big a security hole it would be.
ray326
Can you elaborate on the security issue?
Thanks
_Aerospace_Eng_
12-03-2006, 03:06 AM
PHP even allows you to do this.
<?php header("Location: http://www.google.com"); ?>
If you go to this page
http://pr2006.freehostia.com/test.php
Notice once you are redirected, and you hit the back button it won't take you to that url, but instead the url you last previously visited before that one.
Stephen Philbin
12-03-2006, 09:05 AM
I'm no great one for Javascript, so I can't be entirely certain what that piece of script is supposed to do or what Ray is making of it, but I think Ray is referring to being able to make the address in the address bar of the browser different to that of the address of the actual site being visited. Which is an extremely bad thing indeed.
being able to make the address in the address bar of the browser different to that of the address of the actual site being visited.
To my knowledge it does not affect the address bar it simply replaces the current page in the history list.
As per
window.location.replace("newpage.htm")
newpage.htm would be shown in the address bar
felgall
12-03-2006, 03:01 PM
You can also replace the last entry in the history list when using window.open() to update the content of an already open window by specifying an appropriate value in the fourth parameter.
All of the methods that allow you to update the history list only allow you to replace the entry for the current page with the new one for the next page you are transferring to and there is no way to access any of the other entries in the list to replace them and no way to delete any entries from the list.
ray326
12-03-2006, 03:31 PM
Sounds like a great phishing tool. Replace the previous item then go "back" to it.