Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell if my page is set as the user's homepage?

Tags:

javascript

Is there any way I can detect when my page has been set as the user's homepage in their browser?

I'm most interested in something in javascript, but I'd be happy to hear about other approaches as well.

Edit: I'm not looking for anything sneaky. I'm wondering if there is anything that is explicitly allowed through the browsers to find out this information.

like image 480
Tyler Avatar asked Oct 29 '08 00:10

Tyler


People also ask

How do I change the default homepage for all users?

Navigate to <Computer/User Configuration>\Administrative Templates\Google Chrome - Default Settings\Home Page. Double-click Use New Tab Page as homepage, and set it to Enabled.

What is the default homepage for Microsoft Edge?

By default, Microsoft Edge's home page (the page that automatically loads whenever you go online) is the Microsoft start page. However, you can change this to another of your liking. To do this, click the three horizontal dots (•••) in the top-right of the window.


2 Answers

There isn't likely to be a foolproof method, as that's an intrusion into the privacy of the user.

One thing that comes to mind is checking for a referrer. If the user arrived at your page without following a link, they a) typed the url, b) followed a bookmark, or c) have your page set as their homepage. But that's about the best I can do.

like image 77
Benson Avatar answered Oct 12 '22 09:10

Benson


Nope. You can tell if they got to your page by following a link or not. Check the referrer. However, the browser going to your page as the home page will not appear any different than the user typing in your page or using a bookmark.

like image 40
Andru Luvisi Avatar answered Oct 12 '22 10:10

Andru Luvisi