7 ms·
How removing caching improved mobile performance by 25%
- tyingq 10y agoWell, specifically removing the html5 offline application cache if you don't need offline functionality. That it causes duplicate requests, and apparently more of them in chrome mobile than other browsers, is interesting though.
- dalanmiller 10y agoAgreed ^ this title is a big misleading / clickbaity
- tyingq 10y agoNot sure why they went that way either..."Offline Cache Causes Duplicate Asset Downloads" would have caught my attention just fine.
- disconnected 10y agoNot a web technology expert, but apparently the appcache feature is deprecated (https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_...) and this dead horse has already been beaten to... er, death? before (http://alistapart.com/article/application-cache-is-a-douchebag http://alistapart.com/article/application-cache-is-a-doucheb...). I could be missing something, though. EDIT: Forgot to mention that both links come straight from that article.
- the_duke 10y agoService workers are the way to go now.
- smhg 10y agoBut they aren't available in Safari. And on mobile, where appcache should be most relevant, Safari can have a significant market share.
- TurningCanadian 10y agoThey'll come around. And in the meantime, at least Chrome users can benefit.
- kevlened 10y agoUntil they come around, all iOS users are without service workers, because Chrome on iOS is backed by WKWebView [1]. AFAIK, any custom browser on iOS is required to use WKWebView. [1] http://stackoverflow.com/questions/29895387/service-workers-and-ios http://stackoverflow.com/questions/29895387/service-workers-...
- EGreg 10y agoI want Web Push!!
- kinj28 10y agoTake a spin at DronaHQ. It allows you to build offline web apps that works cross platform
- digi_owl 10y agoiOS Safari has become the IE of mobile?
- jaimex2 10y agoThanks for the heads up.
- sp332 10y agoDid you know you can use Firefox Developer Tools to remotely debug mobile Chrome? It's still in heavy development, but I'm guessing it's easier than trying to quiesce browser activity and tease out network events manually. https://developer.mozilla.org/en-US/docs/Tools/Valence https://developer.mozilla.org/en-US/docs/Tools/Valence
- modeless 10y ago> Never use the application cache (or service workers) unless you actually need offline features. I disagree. Appcache is deprecated and you should never use it under any circumstances. On the other hand, service workers are cool and there are reasons to use them even if you don't need offline features.
- mschuster91 10y agoSafari does not support Service Workers AT ALL, so not using AppCache effectively kills offline support for iOS (source: https://jakearchibald.github.io/isserviceworkerready/ https://jakearchibald.github.io/isserviceworkerready/). Also, according to http://caniuse.com/#feat=serviceworkers http://caniuse.com/#feat=serviceworkers, IE/Edge as well as Safari Desktop and Android 4.x do not support AppCache (compared to near-universal support for AppCache, http://caniuse.com/#feat=offline-apps http://caniuse.com/#feat=offline-apps). This means: use AppCache or lose offline on anything that's not FF/Chrome (on desktops, offline doesn't even matter that much!) or the newest Android. Also, the Service Worker API just plainly sucks when compared with AppCache Manifests. It's a real pity that AC is going down the drain.
- mbrock 10y agoThe Service Worker API is very general so it's like a one time cost of implementing something like the AC manifest using the API.
- chj 10y agoThis, and IndexedDB API are ugly. Any recommendations on wrapper libraries?
- mbrock 10y agoI've been happy with localForage to do simple K/V in Service Workers. Don't know about cache wrapping libraries... I know e.g. Webpack has an offline plugin thing that works with either AppCache or SW.
- thinkloop 10y agoIs this considered a bug in appcache (deprecation aside)? Why would it download twice at all?
- mfukar 10y agoYeah I missed this completely as well. Two requests for each resource because of the two iframes ("main" and "fullscreen")? It seems to me there's a huge logical leap between "..we were unknowingly downloading much more content than was necessary" and the next paragraph - probably just my unfamiliarity with webdev.
- ctaintor 10y agoIn the image on the article, you'll see that I pointed at a duplicate loading of fullscreen.css. If appcache weren't loading this in parallel, it would only be loaded once (by the fullscreen iframe).
- mfukar 10y agoI noticed the duplicate downloads. After all, they're the entire premise behind the investigation. But why does appcache download already requested assets?
- xenadu02 10y agoSince when is only testing in Chrome an acceptable way to develop web applications? I wish the author had shown us some other browser results. I'm curious if the iframe changes affected Safari, Firefox, or Edge. (Others have noted that app cache is deprecated).
- olegkikin 10y agoSince Chrome is, by far, the most popular browser: https://upload.wikimedia.org/wikipedia/commons/5/5a/Browser_usage_share%2C_2009%E2%80%932016%2C_StatCounter.svg https://upload.wikimedia.org/wikipedia/commons/5/5a/Browser_... Chrome also has some of the best dev tools built in.
- nullc 10y agoI wonder how much that is distorted by the aggressive preloading that chrome does and by android (since testing chrome on desktop and mobile is not really the same thing)?
- masklinn 10y ago> Since Chrome is, by far, the most popular browser: 2002 called. You're a terrible person.
- k__ 10y agoYou would be right if it weren't for Chromium.
- sametmax 10y agoIs its a point of view only in people that are to young to have lived the debacle of IE6 years ? Or do some senor devs actually think testing in chrome only is ok ? Cause I read it more and more, and I find it very alarming. If this becomes a trend, we are going to live in pain all over again.
- masklinn 10y ago
- power78 10y agoThis article just displays the author's lack of knowledge of the subject matter he is developing with. Something tells me it was written just to get the company's name out there.
- hamandcheese 10y agoThere's no shame in not being an expert. And isn't getting their name out there the point of a company blog?
- Cozumel 10y agoNot when it demonstrates such technical incompetence.
- dx034 10y agoThe fact that it's on the front page of HN shows that it seems to be interesting to people. Otherwise it wouldn't be here.
- calvin0 10y agoDid this have any improvement on the conversion rate?
- deleted 10y ago[deleted]