As far as I'm aware, there is no public API exposure of a browser's default homepage/search provider. So how does Google know to display this? It only comes around when Google's not the default homepage / default search provider on my browser.
I can only assume they're inferring from numerous variables, such as the referrer. I wasn't able to successfully dig down into Google's compiled JavaScript. I'm not even sure if it's detected client-side or server-side.
I'm on Firefox 44, but I've seen these banners on Chrome, too.
Let's make it clear: A browser is a piece of software that retrieves and displays web pages; a search engine is a website that helps people find web pages from other websites.
In the top right corner of your browser, click the down arrow in the search box. Click Find More Providers. Click Google. Check the box next to "Make this my default search provider."
A home page (or homepage) is the main web page of a website. The term may also refer to the start page shown in a web browser when the application first opens.
Simply there is no way to do that with JavaScript because the "default search/homepage" is a user's preference and you do not have access to that without user's permission because that would be a security/privacy issue.
What Google does at every user visit is show a promo ad with a close icon and a go button with instructions on how to set it as the default homepage. On click of any one of them, it creates 2 cookies so that next time it will check your cookies and make the promos disappear. Even when Google is your homepage and you clear your cookies then a banner is still there to promote Google as your homepage.
I have checked this with Firefox, not aware of Chrome.
I don't know what Google does, exactly, but what I would do:
Referer
field: visitedHelpAboutHomePage
when the user visits the "yes, show me" page (might prevent false negatives, but might also generate false positives)Note that the "special parameter" does happen in the "searchbox-initiated search" scenario: there is a parameter sourceid
which likely means "source of search."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With