The method you are looking for is known as Hijax, where you intercept the response from an AJAX request and pull out only the part of the DOM that you intend to replace on the displayed page.
The general idea is that the actual URL itself will still return the full content of the page, so if the request comes from a new visitor, the entire DOM will load, but if the request comes from the user, click the hijaxed link on your page with the specified selector CSS, then only the part of the page identified by the selector is replaced.
Take a look at Hijax, the jQuery plugin . The actual site itself is built using the plug-in, and if you look at the tab of your network and look at the inspector in your Chrome or Firebug tools, you can see that the content is exchanged without replacing the menu, title or other elements that are not replaced.
source share