limberjax
v0.1.0
Published
limberjax is a jQuery plugin that adds support for partial page loads with ajax while fully supporting URLs with `pushState`.
Downloads
3
Readme
limberjax
limberjax is a jQuery plugin that adds support for partial page loads with ajax while fully supporting URLs with pushState
.
Warning: limberjax is not quite ready for production. Some things are still broken/untested (eg, 404/500 errors), and this code will change/break quite a bit before release.
limberjax intercepts link clicks and form submits, submits them to your server via ajax, parses the response, and replaces the appropriate parts of the existing page with the new content.
Benefits:
- Client only has to download, parse, and process/execute CSS and JavaScript once
- Server can render only what's needed for the request (eg, skip layout render)
Quickstart
This will let you immediately see the majority of the benefits of limberjax on the client without making more in-depth changes on the server yet.
- Save limberjax.js to your project (minify/uglify to your liking)
- Add
new jQuery.Limberjax("#your-content-wrapper");
to your code - On the server, return HTTP response code
412 Precondition Failed
if thelimberjax
query parameter's value does not equal the version on the server (this is your code's version, not limberjax's; a git commit id works well)