liberapay / liberapay.com

Source code of the recurrent donations platform Liberapay
https://liberapay.com/
1.64k stars 207 forks source link

Page preloading (smootState.js or instant.page) #277

Open Calinou opened 8 years ago

Calinou commented 8 years ago

smoothState.js is a jQuery plugin that makes page transitions feel faster. Optional animations are supported, and the library is based on the progressive enhancement philosophy - users with JavaScript disabled or with an unsupported browser can continue to browse the site just fine.

Changaco commented 8 years ago

There might be some issues as we treat some AJAX requests differently than normal requests.

[Edit] Specifically we look for the HTTP header X-Requested-With: XMLHttpRequest. If the preloading requests don't contain that then they should work fine.

Changaco commented 5 years ago

Same thing as a standalone instead of a jQuery plugin: https://instant.page/

Edit: Actually, instant.page isn't exactly the same thing as smoothState.js, it uses the browser's native preloading feature instead of replacing the page's content.

Edit: Let's wait for Firefox to fix its implementation of prefetch: https://bugzilla.mozilla.org/show_bug.cgi?id=1527334