TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

No need to wait for ServiceWorker – speed up your site today

21 pointsby igrigorikover 10 years ago

2 comments

wycatsover 10 years ago
Unfortunately, HTTP caches have opaque, browser-provided semantics that work sometimes and mysteriously don&#x27;t work in other cases.<p>They can&#x27;t be used to ensure that you have a complete atomic set of application assets, are often purged in ad-hoc ways by browsers, and in general aren&#x27;t a good hint to browsers about exactly what the semantics of the caches are.<p>ServiceWorker gives applications control over many of these considerations in a programmable way. If you&#x27;ve ever tried to work with AppCache or control time-to-boot in the context of possibly-warm HTTP caches, you know that this is a godsend.<p>Which isn&#x27;t to say that people shouldn&#x27;t make the best use of HTTP caches, nor that HTTP caches aren&#x27;t currently underutilized. It&#x27;s just to say that the control offered by ServiceWorker will make it far easier to control the nitty-gritty of caching behavior, which matters a lot.
评论 #8736619 未加载
jaffathecakeover 10 years ago
I&#x27;ve made a longer comment on G+, but in short: if you max-age your page for a decent length of time, you lock users into that version of the page. Shipping any kind of update means waiting for that max-age to expire.
评论 #8736622 未加载