Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is pjax the way to go for "fluid" navigation?

Tags:

jquery

ajax

pjax

I've started playing with pjax, as I want to provide a fast, fluid experience for my users without a lot of unnecessary HTTP requests and repeated rendering of unchanged HTML.

I have it working fairly well on my site, and I must say it was surprisingly easy to get up and running, considering how much a difference it makes for the experience.

However, I'm seeing very little support for pjax -- both on StackOverflow, and on the web in general (a google search returns many results at the top totally unrelated to web development).

But as impressed I am with it, even if it's not widely supported yet, I may still use it. My main concern is running into big problems later when I've already invested my code in it without a lot of support. So I wanted to make sure there wasn't something else out there.

Are there alternatives for implementing the same functionality that pjax provides that I'm not aware of? Or is it so new that not many people know about it yet? Or, is it just a bad/problematic implementation?

like image 751
Jerad Rose Avatar asked May 27 '11 05:05

Jerad Rose


1 Answers

http://caniuse.com/#search=history will give you an indication of what supports the current version of pjax.

The severside code that sniffs the request for PJAX header could also react to the browser and degrade nicely for other browsers.

http://forum.kohanaframework.org/discussion/8869/kopjax-simplistic-pjax-jquery-ajax-module/p1#Comment_60090 is a decent list of alternate options.

If you don't mind missing support for other browsers or make changes to do so then PJAX's only draw back I can see is the need to have 1 chunk/partial to update.

like image 171
Denis Hoctor Avatar answered Sep 20 '22 18:09

Denis Hoctor