Change browser URL and page content without reloading and without using fragments

I know well how to use URL snippets to track state on an AJAX-based web page, but lately I have noticed a lot of sites that do something similar, but without snippets.

In this mode, the image viewer works in the latest version of Facebook. The left and right navigation buttons are simple links without fragments that, when clicked, change the browser URL without loading the page completely.

Another example is the GitHub repository , each of the files / folders is a simple link that changes the page state and browser URL without reloading or using fragments of the page.

Can someone explain or point me to an explanation of how this works? I did some searches, but there is so much content about using fragments that I could not find.

+5
javascript ajax
Feb 12 '11 at 17:50
source share
2 answers

I believe this is due to the new pushState HTML5 function

+4
Feb 12 '11 at 17:59
source share

They use the new HTML5 history API. I think this is what you want. check the menu items on this page http://tinywall.info/demos/html5-history-api/menu1.php

A tutorial for implementation right here: http://t.co/M4RvnvoQ

+1
Feb 22 2018-12-22T00:
source share



All Articles