I would like to know if there are any ways to dynamically change the current URL (more precisely, the GET request) in the address bar of the browser without reloading the page? Is this even possible? If not, what would you advise on this? I, for example, tried to "emulate" a GET request, replacing the question mark with a pound sign (#), but in my opinion it looks "cheap."


  • and what is Ajax not for you? just not quite clear why you need it - Ale_x
  • I need this for a dynamic (visual) update of a GET request. - Salivan
  • Also hashcode.ru/questions/164674/… . Finish looking for the gentlemen, it's not so hard, believe me! - lampa

3 answers 3

What does it mean to c "look" cheap? On Twitter, the same way it looks, IMHO, very "expensive". Moreover, search engines already know how to index pages with dynamically updated content, precisely when there is a "#!" In the URL.

  • Thanks for the info =) - Salivan 7:49

URL can be changed by

window.history.pushState(null, null, url); // это работает в chrome 


 history.pushState(null, null, url); // а это в firefox 
  • And for other browsers .... - Salivan
  • Well, the very first link to a library that supports all browsers - thunder

Well, the very first link to the library that supports all browsers

The library was tested in browsers: IE 6+, FireFox 3+, Opera 11+, Opera Mobile 11+, Chrome 17+, Safari 5+