You don't write any code to do this because you don't want to do this.

Changing a user's home page via any scripted means counts as a Browser
hijack attempt and will be flagged by any anti-spyware application.
Before IE 7.0, it was possible to do this using the
document.setHomePage() method. However, all modern browsers consider
this a security flaw and do not provide any such method.

If you want to provide a means to set your site as a user's home page,
it is much wiser to provide browser-specific instructions to the user
so that they can set it manually.

On Oct 8, 11:34 am, Suraj <[email protected]> wrote:
> All,
>
> I am planning to give a link in my project as "Set as home page". What code
> should i write to set the page as home page.
>
> Regards,
> Vikas

Reply via email to