我如何像 GitHub 那样进行令人敬畏的无刷新页面更改? [英] How do I do awesome refreshless page changes like GitHub do?
问题描述
GitHub 似乎正在做一些令人难以置信的事情:动画页面更改而不破坏状态.地址栏发生了变化,但页面没有刷新,而且我会进入下一个视图.
GitHub seems to be doing something incredible: animated page changes without breaking state. The address bar changes, but the page doesn't refresh and I get animated to the next view.
例如,点击这个 URL:as3logback/ 然后点击这个 URL:as3logback/lib
For example, hit this URL: as3logback/ then hit this URL: as3logback/lib
他们到底是怎么做到的!?!这太酷了!他们使用的是某种框架还是服务器端的东西?
How in the devil are they doing it!?! It's so cool! Are they using some sort of frame or something serverside?
推荐答案
他们在此处提供了有关其工作原理的详细博客条目 (HTML5 History API):https://github.com/blog/760-the-tree-slider
They have a detailed blog entry up on how it works (HTML5 History API) here: https://github.com/blog/760-the-tree-slider
这篇关于我如何像 GitHub 那样进行令人敬畏的无刷新页面更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!