6 ms·
PageAccelerator – A very light solution to load web pages faster
- Retr0spectrum 10y agoWhat does this offer over native preloading? https://css-tricks.com/prefetching-preloading-prebrowsing/ https://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 http://caniuse.com/#feat=link-rel-preload
- deleted 10y ago[deleted]
- evandrolg 10y agoFor 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 :)
- evandrolg 10y agoFor 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 :)
- throwaway1974 10y agoWould 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).
- daok 10y agoThe 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.
- DubiousPusher 10y agoDon't know much about web development but in most cases isn't that exactly the scenario you usually aren't worried about being slow? Not that someone couldn't make a slow static page but in general aren't static pages going to load pretty fast anyway?
- deckar01 10y agoI 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.
- timecube 10y agoHow is this different than InstantClick (http://instantclick.io/ http://instantclick.io/)?
- cmiller1 10y agoInstantClick advantage: it adds the feature of downloading the content on hover lowering latency PageAccelerator advantage: smaller file size, 2.2kb minified as opposed to 5.9kb for InstantClick
- SecConsult 10y agoLets say... totally different?
- allendoerfer 10y agoInstantclick also seems to be unmaintained.
- caub 10y agopeople should just use historyAPI directly
- strommen 10y agoHave 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.
- superchink 10y agoIt looks like the author specifically mentions pjax as a similar project. pageAccelerator is a very light version of turbolinks and pjax (our minify file has 2.2KB!). It seems as though it's meant to be a lighter weight version.
- cmiller1 10y agopjax is mentioned in the README, they say the advantage to this is that it has a smaller file size.
- deedubaya 10y agoWhy not https://github.com/turbolinks/turbolinks https://github.com/turbolinks/turbolinks? Say what you want about previous versions of Turbolinks, but the latest version works really well and has support for native web views.
- haukur 10y agoIf 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?).
- eyelidlessness 10y agoFor 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.
- lostboys67 10y agoor use AMP pages https://www.ampproject.org/ https://www.ampproject.org/
- michaelmior 10y agoWhile AMP is great, it doesn't serve the same purpose and is only designed to work for specific types of content and not an entire site.
- lostboys67 10y agoErr not so google is prompting me to add amp pages to a site (major travel brand) which is out the initial use case
- rileytg 10y agoI 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?
- eyelidlessness 10y agoPossibly 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.
- Illniyar 10y agoUsually it has a lot more options most don't use, or are handling edge cases most don't care about.
- deevus 10y agoPerhaps I'm understanding this incorrectly, but what happens if you have a destructive link that deletes something?
- beejamin 10y agoThe 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.
- kayamon 10y agoSearch engines have the same problem. The solution is simply to not use HTTP GET for destructive links - use PUT or POST instead.
- Cthulhu_ 10y agoGoogle 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.
- dalore 10y agoYou make it a http POST as per the standard.
- evandrolg 10y agoYour you do it with POST / PUT ;) If you would like to do it using a link, you simply add data-pageAccelerator="false"
- kingkool68 10y agoI love this technique. It's how I built this image gallery for my daughter's website https://www.zadieheimlich.com/easter-2016/ https://www.zadieheimlich.com/easter-2016/ Didn't use PageAccelerator or Instantclick or Turbolinks. It's just jQuery. Here is the source https://github.com/kingkool68/zadieheimlich/blob/master/js/post-gallery.js 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 :)
- Domenic_S 10y ago4) it breaks the back button
- o_____________o 10y agoDoesn't break for me on Chrome
- tarellel 10y agoWhat browser are you using? Because it works fine for me.
- a012 10y agoPhotos can't load at all: https://i.imgur.com/uvxNb6i.png https://i.imgur.com/uvxNb6i.png
- rangibaby 10y agoThe background of your page is displaying random junk from my screen in Safari: https://dl.dropboxusercontent.com/u/22209335/Screen%20Shot%202016-09-13%20at%205.41.07%20PM.png https://dl.dropboxusercontent.com/u/22209335/Screen%20Shot%2... It works fine in other browsers. My computer may be at fault. Is this the magic of your magic-shield? :-)
- oliv__ 10y ago
- Myrth 10y agoRIP server log file, analytics and clients' metered connections
- gcatalfamo 10y agoI have the same concern: is there a way not to screw analytics?
- michaelmior 10y agoWhy? This only loads the page on click when it would have been loaded anyway.
- omnimus 10y agoThere are few more. Senna.js Barba.js... 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.