AJAX导航改变所述浏览器的位置所述、浏览器、位置、AJAX

2023-09-10 18:20:41 作者:懂我的人捅我

我一直在想了一会儿如何github.com做它的导航。如果输入的FF4项目或浏览器(如果它在FF3.6工作不知道)(只有两个我们已经确认的工作,还没有测试过得多了,但它不能在IE9工作)他们有AJAX导航(新页面加载一个Ajax请求,只有新的内容交换在客户端),仍是URL的变化。而且这不是URL,实际的URL变化的只是哈希的一部分。这是怎么做的?

I've been wondering for a while how github.com does it's navigation. If you enter a project in the FF4 (don't know if it works in FF3.6) or Chrome (only two I've confirmed working, haven't tested much more, but it doesn't work in IE9) they have ajax-navigation (the new page is loaded in an ajax-request, and only the new content is exchanged on the client side), still the url changes. And it's not just the hash-part of the url, the actual url changes. How is this done?

推荐答案

完全从GitHub的团队在这里的解释:

Full explanation from the GitHub team here:

https://github.com/blog/760-the-tree-slider