Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

i need script in jquery that make the page as your default home page website in the browser

i need script in jquery / javascript that make the specific site as the homepage in the browser, i need it compatible for all browsers , if that possible .

i dont mean it should be done automatically ,

thanks.

like image 337
Haim Evgi Avatar asked Dec 18 '25 23:12

Haim Evgi


1 Answers

In Internet Explorer 7 and earlier it was possible to do this using

document.setHomePage("http://www.mywebsite.com/");

However, this is not possible in more recent version (as it is considered a security risk) and has never been possible in other browsers like Firefox.

The best fallback is to actually instruct the user how to change home page instead of programatically trying to accomplish it.

In Firefox (I'm not sure about other browsers) it is possible for the user to drag a link and drop it on the home button, and thereby (after confirming) changing the start page. You may utilize this by instructing the user to drag an image (that is inside an anchor tag linking to your website) and drop it on the home button.

like image 54
stpe Avatar answered Dec 20 '25 11:12

stpe