开发者

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 compati开发者_开发百科ble, 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜