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
  • 39,703
  • 12
  • 54
  • 77
  • 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
  • 43,482
  • 6
  • 101
  • 102
12

They described this html5 functionality on their blog here

igorti
  • 3,828
  • 3
  • 22
  • 29
3

HTML 5's pushState

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335