1 private link
Finding out how browser and proxy caches behave (and misbehave)
You now have a simple, platform-reliant way of preventing unnecessary requests. You have another tool in your belt to save your users time and money. Also you’ve got a way to save a little carbon from being released into our atmosphere to power a server farm. And you can use this tool with any style of website: static file sites, single page applications, and server rendered applications. It’s a superpower.
The implementations of Back/Forward caches in popular browsers are helping to improve this experience even further - which has the benefit of significantly speeding up the web for up to 20% of navigations!
Since we’re already pushing data to the client at the earliest possible time in the page load — the only faster way to get data to the client would be to not have to fetch or push any data at all.
The usual uses cases for Service Workers is pre-caching; custom offline pages; saving pages for offline reading. What if we could use the Push API to introduce a subscription strategy based on content push and offline first?
"Keeping things fresh with `stale-while-revalidate`", Jeff Posnick (@jeffposnick) #HTTPheader #cache
stale-while-revalidate
helps developers balance between immediacy —loading cached content right away— and freshness —ensuring updates to the cached content are used in the future.
"For most developers, code caching should “just work”. It works best, like any cache, when things stay unchanged, and works on heuristics which can change between versions. Nevertheless, code caching does have behaviors that can be used, and limitations which can be avoided, and careful analysis using chrome://tracing can help you tweak and optimize the use of caches by your web app."
HTML, byte size, streaming, GZip and caching
"In a year since Facebook’s blog about Cache-Control Immutable, we can see that it’s usage has spread beyond Facebook and is being used by a handful of large 3rd parties and ~4150 additional domains. Across all of the pages in the HTTP Archive, 2% of requests and 30% of sites appear to include at least 1 immutable response. Additionally, most of the sites that are using it have the directive set on assets that have a long freshness lifetime."
Full Page Caching With Personalized Dynamic Content
"Managing your service worker cache invalidation is a key step in making your progressive web app a rich robust experience. It ensures that the content your customer sees and interacts with is the freshest content possible. It also guards your app from overstepping the cache quota and potentially causing a complete purge of everything you stored."
La stratégie de cache CDN à L’Equipe
"So, in conclusion, if you want to invalidate a script or other subresource, I would use the Iframe + POST technique today, which works in all browsers for both same-origin and cross-origin."
"In this article we have looked into using caching in order to enhance website performance. The enhanced performance will in turn lower operating costs for our websites and preserve our users’ flow, leading to a great user experience."
Understanding how much storage is available to your application is important when planning your experience. You need to find a good balance between caching everything and caching responsibly.
The application cache is a poorly understood part of the HTML5 specification with a lot of potential. Let's get rid of some of the confusion and make the web a faster place.
Etude de cas Performance Web sur le site de Wired
Patterns d'utilisation d'AppCache et des ServiceWorkers pour la gestion du offline.