Changing URL without refresh?

Spudster picture Spudster · Jun 18, 2013 · Viewed 8.9k times · Source

I found an app on the internet inside of which, when you click A link it will redirect to A page without refreshing the whole place and changing the url address bar, I know its possible becuase JQuery has access to the client sode browser.

Please help me with this.

Answer

Nick Ginanto picture Nick Ginanto · Jun 18, 2013

using the history api you could do something like this

  if (history && history.pushState){
     history.pushState(null, null, '/new/url');
  }

try it in your browser now with chrome js console

thats all it takes (maybe a little more, but thats the basis of it

read more in http://diveintohtml5.info/history.html