I need functionality like the below website. When you scroll down, new stories are fetched from server using AJAX and the URL is also updated. There is no hash # in url as well.
How can I achieve this?
thanks
I need functionality like the below website. When you scroll down, new stories are fetched from server using AJAX and the URL is also updated. There is no hash # in url as well.
How can I achieve this?
thanks
window.history.pushState(“state object/id”, “Title”, “/new-url”);
Still, you need to use hashes on browsers that do not support it. I use https://github.com/browserstate/history.js that does all the old browsers fallbacks for me.
You might like to try project sarus.
http://srijanlabs.github.io/sarus/
It is a framework built in angularJS to carry out similar functionality. It fetches articles as the user scrolls through the page while url mapping is maintained in browser's address bar.
Moreover, being a frontend application it is highly customizable and works with API/RSS to fetch data.