Rolling your own PJAX implementation with History.js

If you were like me, at some point you read somewhere about this cool new thing called PJAX. Essentially, instead of issuing normal HTTP requests when navigating a site, links are fetched and loaded via AJAX to avoid full page refreshes. The site feels much more responsive. This isn’t without it’s quirks however.