A basic example that guides you through the service worker code to dynamically adjusting resources based on browser, network connection and device memory.
If you'd like to learn more about this code, I've written up a full blog post 2018 Performance Calendar.
For a live demo, please visit deanhume.github.io/pwa-cloudinary/.