Search code examples
javascriptjqueryhistory.js

History.js - Appeding to query string without browser reloading


I want to manually update the url query string without reloading the browser. Apparently history.js https://github.com/browserstate/history.js/ does the job.

I've read several documentation but looks like that framework does a lot more than I need, so I'm confused how to achieve my simple requirement.

Any code snippet's how to achieve it?

Thank you


Solution

  • Try this:

    Use history.pushState & history.replaceState methods

    Eg: http://html5demos.com/history