since you use PHP and jQuery, the best option would be my project , phery http://phery-php-ajax.net , it is actively supported, and I have been improving it over the past 2 years.
with the help of views, you can segment your site in separate ajax views or use the full-blown content of the page through AJAX. it is optimized for SEO, and since it uses delegation delegation, all new elements are already auxed out. It does not provide the use of a history API or hash events, you can choose the best functionality for yourself.
the full loaded AJAX content for your site will be (of course, only a container, no menu, footers, etc.)
var ever_pushed = false;
a smaller version of the same code would be:
$(function(){ var ever_pushed = false; phery.view({ '#container': { 'afterHtml': function(html, data, passdata){ if (typeof passdata['popstate'] === 'undefined') { window.history.pushState(data, data.title, data.url); ever_pushed = true; } } } }); $(window).bind('popstate', function(e){ if (!ever_pushed) { return; } phery.view('#container').navigate_to(document.location.toString(), null, {'popstate':true});
in your PHP side, this will be:
function render_view($data, $params, $phery){ return PheryResponse::factory()->render_view(views_get_view('all_projects')->execute_display('Block', array())); }
source share