Ajax and Pjax

I’m going to talk about pushState. I’ve lernt the technology by using pjax. As you might know ajax and pjax, this technology allows browser to override new contents on the previous ones without reloading.

Only contents are different between two pages

Assume that there were two pages, the header and footer of which were exactly same decoration.


Put new contents on current page

Ajax technology can fetch new contents which wants user override on current contents. This technology is extremely effective in case of switching contents by clicking a tab.


Put new contents on current page, changing path

Pjax adopt a pushState technology in the internal code. With the pushState technology, as of HTML5, historyAPI enables to behave as browser’s backing function. Therefore pjax can put new contents into the current page like ajax technology can do and Changing the path without reloading coincides with it.