4

Possible Duplicate:
How do I, with JavaScript, change the URL in the browser without loading the new page?

In http://acko.net/, when I click on the "Archive" arrow, it will show a "loading" picture and when it's done, a nice transition would slide me to the next page. And what make me curious (and crazy) is when it done sliding to the next page, the URL changed! And there's more. When you use the Web Inspector and enter history.go(-1);, it also shows the transition. I saw that and I keep saying "What the heck"!

So, how is it achieved??? That website doesn't make any sense to me, since I thought history.go() would reload the whole webpage, but in fact it does not. That website is totally amazing, including the 3D animation at the top. (requires Webkit)

Community
  • 1
  • 1
Derek 朕會功夫
  • 84,678
  • 41
  • 166
  • 228
  • 5
    oh my god that one of the hell of design – dynamic Mar 07 '12 at 01:43
  • @yes123, it is just AMAZING... – Derek 朕會功夫 Mar 07 '12 at 01:46
  • 1
    probably plays around with the html5 history api, take a look at: http://diveintohtml5.info/history.html There is a fully explained example which achieves the same thing: http://diveintohtml5.info/examples/history/fer.html – ma cılay Mar 07 '12 at 02:10
  • 1
    See this question, specifically the second answer: http://stackoverflow.com/questions/136458/how-do-i-with-javascript-change-the-url-in-the-browser-without-loading-the-new – Jeff B Mar 07 '12 at 02:10
  • @Jeff B, Yeah, in his post, [_Making Love To WebKit_](http://acko.net/blog/making-love-to-webkit/), he told us that he used the HTML5 `pushState` API. Can you put that in the answer so I can check it? – Derek 朕會功夫 Mar 07 '12 at 03:18
  • 3
    if it works on IE, it is black magic – ajax333221 Mar 07 '12 at 04:37

1 Answers1

1

See this question, specifically the second answer: Change the URL in the browser without loading the new page using JavaScript

He seems to be using the HTML5 pushState API

Community
  • 1
  • 1
Jeff B
  • 29,005
  • 6
  • 60
  • 85