25

Hey, I have noticed that when browsing a GitHub repository it uses AJAX to load each folder / file.

I understand all this, I was just wondering how they altered the URL. Can you get and set the URL with JavaScript? If so it could be very useful for bookmarking a section of a JavaScript based website. ( a few pages within one, moved between with JavaScript )

Thanks.

Olical
  • 36,487
  • 11
  • 54
  • 76
  • 1
    and also http://stackoverflow.com/questions/4664166/how-to-do-awesome-refreshless-page-changes-like-github – Paul Dixon Feb 11 '11 at 20:46

3 Answers3

21

It uses the new push/pop state functions in the history manipulation API.

Matt
  • 42,312
  • 6
  • 93
  • 99
12

They described this html5 functionality on their blog here

igorti
  • 3,758
  • 3
  • 20
  • 29
3

HTML 5's pushState

Quentin
  • 857,932
  • 118
  • 1,152
  • 1,264