3

Possible Duplicate:
How to change the URL displayed in the browser without leaving the page
How to do awesome refreshless page changes like GitHub
Change browser URL and page content without reload and without using fragments

It is amazing! The new Dropbox web version can do this! It will do ajax request and change the url,but the page will not refresh!(not change the hash)

The url will change from https://www.dropbox.com/home/ to https://www.dropbox.com/home/Public.

You can try it.

How to achieve it?

Community
  • 1
  • 1
Dozer
  • 5,025
  • 11
  • 36
  • 52

2 Answers2

3

They're using HTML5 Pushstate:

http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate

What is pushState?

The history object gains two new methods, pushState & replaceState, that allow us to change the current location of the browser without making an HTTP request. These new locations are stored in the browsers history so that both the back and forward button work as expected.

 history.pushState({foo: "bar"}, "foo page", "/foo")
reach4thelasers
  • 26,181
  • 22
  • 92
  • 123
2

This is something you can do within the same domain by using the history.pushState() method

Gareth
  • 133,157
  • 36
  • 148
  • 157