payling
payling

Reputation: 2524

how does Google append search parameters to url without reloading page?

How does Google append search parameters to url without reloading page?

Does anyone know how they do it? I know about the HASH trick and the webkit pushState function. I don't think they are using either.

Their solution is cross browser compatible, do they use a combination of different methods for each browser?

Upvotes: 2

Views: 686

Answers (2)

Magnar
Magnar

Reputation: 28830

Google uses the hash-trick. Notice that all the parameters are after

http://www.google.com/#

Edit: If you entered the page with other parameters, the # may be further out in the link.

Upvotes: 7

Darin Dimitrov
Darin Dimitrov

Reputation: 1039050

You can add parameters after the hash sign (#) without reloading the page using the window.location.hash property.

Upvotes: 2

Related Questions