User talk:Ian Moody/custommainpage.js
Latest comment: 18 years ago by Ian Moody in topic Back button bug fixed
Back button bug fixed
editHi, I discovered that the original script had a bug, in that clicking the back button in your browser when on the preferred Main Page would just return you to that page again (via the nominal Main Page)... So I fixed it, replacing the 'action part' of the script by the following:
location.replace("http://en.wiki.x.io/wiki/Main_Page_alternative_%28Classic_2006%29")
The location.replace
method deletes the changed-from URL (here: the nominal Main Page) from the browser's history list, thus handily avoiding the 'back button bug'.
I have implemented the fix on my own user account, in case I want to do further changes to the script which might need testing before you'd want to include the code over here. --Wernher 22:26, 21 April 2006 (UTC)
- Thank you for noticing and fixing that, I have incorporated the change into the script. — Ian Moody (talk) 18:54, 23 April 2006 (UTC)