Interesting to see the differences between InstaClick and Pjax.
InstantClick
- InstantClick is a little easier to implement, with nothing required server-side
- InstantClick works to reduce latency by prefetching page content on hover.
- InstantClick always replaces the body's outerHTML
- InstantClick provides a YouTube style loading progress bar
Pjax[1] - You specify specifically which page element is replaced (using the ID)
- You set up your app to return only the required page fragment on ajax calls
- No loading bar is included, but can easily be added
- Content is not prefetched on hover
I think I still prefer the pjax approach because it sends less data over the wire. However, would be interesting to see a hybrid of the two approaches.Also worth noting that both essentially turn your site into a single-page app that updates the browser URL bar using pushState. Both approaches also degrade nicely.