For now, we don't have support to it. We just do loading pages in background and we control the history ;)
In the future, I'd like to improve to use native preloading :)
For now, we don't have support to it. We just do loading pages in background and we control the history ;)
In the future, I'd like to improve to use native preloading :)
Would SiteAccelerator not be a better name since this speedsup site loads due to preloading of pages, but does nothing to the current page (well beside adding extra javascript to it).
The biggest flaw of this solution is that it will fetch pages that might changed by the time the user click the link. This solution is good for website that doesn't change often or for more static website.
I believe Turbolinks addresses this concern by displaying the stale page from the cache while requesting the latest version. Not sure if this library uses the same approach.
Have you checked out pjax? I believe it does the same thing.
The biggest problem I've had trying to use stuff like this is that the page load events don't fire. And many pages run lots of JavaScript in these events.
If you want a single-page app feel to your website, build it as a single page app from the beginning. Bolting something like turbolinks on top of an existing website will probably give you more headaches than it's worth. You can't escape the fact that the app suddenly has state and you need to deal with it (and then why not do so from the get-go?).
For content sites that don't deal with a bunch of state, this could be a nice addition to make navigation feel faster without compromising SEO and without introducing a complicated build solution for server-side rendering.
You do know that it's only fast because it's hosted on Google's CDN right? And if you're coming through from a search, there's a nag blue header you can't get rid of. Not to mention all the strict guidelines for things you cannot do.
I always get worried when someone uses a lib that's 2.2kb vs 55kb (turbolinks) just to save size...when the two do the same thing. what are the 53kb doing? nothing?
Possibly handling a bunch of edge cases, possibly bundling in a bunch of dependencies for dev convenience (which recursively do the same), probably some of both.
The official answer is "Links shouldn't ever create or delete things". Of course, in practice, lots of links do create and delete things, and that this type of preloading would be a really bad idea on those sites.
Google had an accellerator in their browser toolbar like 10 years ago which prefetched pages like that. It didn't end well with poorly built webapps with 'delete' links.
I like this way over a client-side JavaScript framework app approach because...
1) It fails gracefully if JavaScript is unavailable
2) I can keep most of the logic on the server side since the JavaScript is only fetching an HTML page and parsing for content
3) It's fast :)
In my browser (OSX, Firefox 48), there is this horrible flash every time I switch pictures. IMO, the perceived speed is completely outweighed by this flickering and it makes the website/web app feel flaky.
Tried all of them and Senna.js wins. Not the best docs but damn that thing is so fast with that cashing. They are working on service worker preloading stuff like that. And you can go pretty deep. Also seems most durable and maintained of the ones i tried.
45 comments
[ 0.24 ms ] story [ 97.1 ms ] threadhttps://css-tricks.com/prefetching-preloading-prebrowsing/
Edit: It would appear that only Chrome and Opera currently support it: http://caniuse.com/#feat=link-rel-preload
Not that someone couldn't make a slow static page but in general aren't static pages going to load pretty fast anyway?
PageAccelerator advantage: smaller file size, 2.2kb minified as opposed to 5.9kb for InstantClick
The biggest problem I've had trying to use stuff like this is that the page load events don't fire. And many pages run lots of JavaScript in these events.
Say what you want about previous versions of Turbolinks, but the latest version works really well and has support for native web views.
https://cdn.ampproject.org/c/amp.livescience.com/55991-giant...
"pageAccelerator is a very light version of turbolinks and pjax (our minify file has 2.2KB!)"
Didn't use PageAccelerator or Instantclick or Turbolinks. It's just jQuery. Here is the source https://github.com/kingkool68/zadieheimlich/blob/master/js/p...
I like this way over a client-side JavaScript framework app approach because... 1) It fails gracefully if JavaScript is unavailable 2) I can keep most of the logic on the server side since the JavaScript is only fetching an HTML page and parsing for content 3) It's fast :)
It works fine in other browsers. My computer may be at fault.
Is this the magic of your magic-shield? :-)
Tried all of them and Senna.js wins. Not the best docs but damn that thing is so fast with that cashing. They are working on service worker preloading stuff like that. And you can go pretty deep. Also seems most durable and maintained of the ones i tried.
Pjax hasnt been updated for years for example.