I don’t know how to describe this, but I have a website that dynamically loads content using ajax. Therefore, the page is never reloaded and the URL stays the same. I would like the page to never refresh, but the URL to change, so people can copy and paste the URL and share it. When someone goes to the URL it will auto update the ajax to the content that should be on screen.
Now that was an awful description.
Here’s an example:
If you change the url completely even with javascript then in that case the whole page reloads.
You can add parameter after # in url which can act as an identifier for different page.
You can add it as follows –
as you told that you are loading the page with ajax so you can obtain the identifier from url as follows –
And so depending on the value of identifier you can load different contents.