5 ms·
This is a useful guide, however there is one thing missing that will have an order of magnitude improvement over anything that is mentioned. Use appcache (or s
by daleharvey 11y ago
This is a useful guide, however there is one thing missing that will have an order of magnitude improvement over anything that is mentioned.
Use appcache (or service workers in newer browsers). Yes appcache is a douchebag, but its far simpler than going through all of these and will have a far bigger improvement
- nateberkopec 11y agoNeat - I've never used it. I thought appcache only really helped "offline" web apps. How can it speed up ordinary sites?
- daleharvey 11y agoBrowsers make a best attempt at caching, but they dont have a lot of information to go on huge amounts of data that may be able to be cached and the only way to check if its out of date is by going over the network. Appcache / service workers give you more absolute control over that caching, generally once data is cached it is loaded immediately from disk forever thereafter (and updated in the background when needed).
- james33 11y agoI can testify to this, we use appcache for our HTML5 game and it massively improved load times. However, if you are going to use it, be absolutely sure you know what you are doing. There are easy ways to mess up and no going back if you do.
- deleted 11y ago[deleted]
- roflc0ptic 11y agoIf you're wondering why this got downvoted, I did it accidentally. Appcache looks interesting, though. Thanks.
- forgotAgain 11y agoAppcache may not be the best approach for new work. It is deprecated and not recommended for future use. https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_...
- brazzledazzle 11y agoIt says that service workers are the replacement but on the service workers page cautions that they are experimental technology and the spec isn't finalized[1]. If you're deploying a new application which should you use? [1] https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor...
- daleharvey 11y agoI use service workers for side projects that only target new browsers, and appcache for everything else.
- mtberatwork 11y agoService Workers is a definite game changer. However, one thing to remember when implementing them is that you will need to be entirely on HTTPS.
- dspillett 11y agoThat is a pain. I've got a project in early stages that is using AppCache to deal with disconnected use, and AppCache's replacement isn't commonly available yet. Then again I'm using AppCache as lightly as possible to get around some of the issues people report, essentially managing my own cache in one or more of the local storage options and just using AppCache for the stub that primes/updates the core code in that cache, so switching to using another option just as lightly might not be difficult. I'll have to read around Service Workers and make sure I'm not arranging to shoot myself in all three feet...
- moron4hire 11y agoIn my experience, appcache only improves second loading time. You need all of these other techniques to improve first loading time. 2nd time is much, much less important to optimize, because returning users have already gotten through the annoyance filter, know what they are in for, has at least subconsciously accepted the necessity of the load time they experienced the first time. It's nice they won't have to experience it a second time, but if first-time loading is very long, your second-time users are going to be much fewer. I had written quite a bit here on the sorts of things that I do to make very short time-to-first-view sites, but basically the techniques all fall in place if you setup Google Analytics and use their Page Speed Suggestions. You should be able to get to 95% on mobile, 98% on desktop (I lose points on some 3rd party scripts I've included for order processing, so I can't get around it.). It will be a bit difficult your first time, but after that you will know what all the tricks are and future sites you will just make "right" the first time.
- JoeAltmaier 11y agoConfused; won't the second user experience faster page load with appcache?
- nostrademons 11y agoAppCache is client-side; it caches a certain set of URLs in your browser so that they are available with no HTTP request. It doesn't work until your browser has hit the page once, downloaded the cache manifest, and saved the files.
- seanwilson 11y agoLoading more than just the first page the user visits quickly is still really important though. If each link the user visits is slow they're more likely to leave the site and that reduces your chance of a conversion.
- moron4hire 11y agoThat has nothing to do with appcache specifically. You'll get that with regular, ol' HTTP cache control.