Write up about doing some brushing up on progressive web apps and effort to understand some concepts better especially caching strategies. Progressive Web Apps(PWAs) are normal web applications which can feel like native mobile applications to the user. By Sholley O.
The Cache only strategy returns a resource from the cache without ever going to the network. If it doesn’t exist in the cache, it fails and nothing happens because at no point are we trying to get that resource over the network. This strategy is useful for serving assets pre-cached during the installation of a service worker.
Building PWAs you’ll be doing some caching. It could be assets(css, js, icons, images), responses or even a fallback offline page. So choosing strategies that work best for your application is very important.
Tutorial then goes over common caching strategies:
- Cache only
- Network only
- Cache first
- Network first
- Stale while revalidate
Very straightforward and hands on tutorial with all examples in JavaScript. Godo read!
[Read More]