简体   繁体   中英

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?

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.

您可以在哈希符号( # )之后添加参数,而无需使用window.location.hash属性重新加载页面。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM