Article · 12 min read
Adaptive Serving using JavaScript and the Network Information API
Addy Osmani · AddyOsmani.com Free Advanced
A focused, code first companion on reading the user's connection (and even their data saver preference) and adjusting what you load. Osmani keeps it concrete: swap a video for an image, skip a preload, respect someone who has asked to save data. Handy when you want the exact API and a working pattern rather than the concept.
- Respect the user's explicit data saver preference when it is set
- Downgrade heavy media gracefully instead of blocking the page
- Adaptive loading keeps one codebase working across network conditions