js maintain history states code example
Example: javascript window.history.pushState
window.history.pushState("http://example.ca", "Sample Title", "/example/path.html");
window.history.pushState("http://example.ca", "Sample Title", "/example/path.html");