This article was originally published in PC Pro and is reproduced with permission.
Dave from Glasgow emailed to ask if there was some JavaScript which he could use to enable visitors to set his site as their home page.
That's a good question, and one which is important because many users simply don't know how to - or can't be bothered to - change their home page, so it sits there pointing at MSN, Freeserve or some other awful ISP 'portal' page.
If you want to get them to change it you'll have to provide an easy way. As you'd expect, Internet Explorer and Netscape both do it differently and to be honest, although Netscape does publish details of how to do it, we've never been able to get it to work on all flavours of its browser without generating run-time errors. As IE is currently the dominant browser, we'd suggest you use conditional code to offer the facility only to those with a Microsoft browser. What you do is really quite simple. Open up Notepad and type:
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Start Page" ="http://www.yourdomain.com/"
Save this as a file called default.reg and upload it to your Web server. All you now need to do is to add a link to this file:
<a href="\utils\default.reg">Click here and select 'Open' to make this your default homepage</a>
Isn't that a lot easier than trying to explain how to navigate through the Internet Options dialogs?
All articles Copyright CST Group Limited ©1997-2024
Let's Talk
Whether you have a new or existing project, we’d love to hear from you.
Our experienced team thrive on problem solving and working with your business goals in mind.