开发者

How does a website load only part of the page and still display full on URLs?

I am looking at the Gawker blogs (http://io9.com, http://lifehacker.com/) and I'm curious about how they are made.

When I click for on a link only the article part of the page reloads displaying a loading icon while it does.

But what I can't figure out is that links point to new URLs like io9.com/something/something and its not something like I see on ajax pages that they put a site开发者_JAVA技巧.com/#something tag at the end of the url from javascript to mark the page after an ajax request.

Can I change the full blown URL from javascript or what is happening?


When it happens, the website is using the HTML5 History API. This API can change the url (via JavaScript) without changing the page.

See caniuse.com for browser support. If you would like to implement it in yout website, backbonejs.org would be very useful.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜