How does Google instantly change the referent sent by the browser?

If you click on the result in Google Instant, the referent sent by your browser to the destination site contains a bunch of parameters, including all the important q = [autocomplete requests]

But you go from a page whose URL is just http://www.google.com/ with a bunch of things after the # symbol, that is, as a link on the page.

So the browser seems to send the URL as a referent, which is different from the URL of the page you were viewing when clicked.

There seems to be no extra redirect, so how do they do it?

+7
ajax google-instant
source share
3 answers

In most cases, a Google search result will actually send you to a Google redirect page, rather than directly to your landing page. They use javascript to switch the onmousedown link target when you click on it.

You can see this effect by clicking and holding the link to the search result and watching your status bar.

This is not the case with Google Instant; they have been doing this for quite some time on their standard results pages.

+5
source share

The URL page binding element can be processed on the client side without a new server request. Even when it comes to static anchor links (for example, <a href="#foo">Section Foo</a> ), clicking on them does not cause a new request to be sent to the server; It is fully processed in the browser.

Javascript used by Google to run Google Instant simply changes the binding programmatically before making a request to the server.

-one
source share
-2
source share

All Articles