Chapter 3. Caching

Imagine you’re on a train using your mobile phone to browse your favorite website. Every time the train enters an area with an unreliable network, the website takes ages to load—an all-too-familiar scene. This is where Service Worker caching comes to the rescue. Caching ensures that your website loads as efficiently as possible for repeat visitors.

This chapter starts off by looking at the basics of HTTP caching and what happens under the hood when your browser navigates to a URL. We’ll also look closely at how you can use Service Worker caching to provide your users with a faster, more reliable website and how it works hand-in-hand with traditional HTTP caching. You’ll learn how you can use Service Worker caching in a real-world ...

Get Progressive Web Apps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.