Search code examples
javascripthtmlurlbrowserbrowser-history

Changing URL as long as you are scrolling the webpage


I was seeing the NASA's press release / image gallery, (you can see it here) and it has come to my attention that as I'm scrolling down the webpage and seeing different posts, the URL in the address bar was changing (I was using chrome, but tried in Internet Explorer too and works as well).

How can I achieve that "effect" in my personal blog? Seems a perfect way of making consistent URL's, without navigating in the complete post / article. Any web framework / template that do it out-of-the-box? I'm using Ghost. Thanks in advance


Solution

  • I looked at the HTML5 History API, and now I know I can do what I want.