Differentially deliver fast, lighter experiences for users on slow networks & devices
A comprehensive showcase of adaptive loading strategies for modern web applications. This microsite demonstrates how to deliver optimized experiences based on user device capabilities, network conditions, and hardware constraints.
- Network-aware loading - Optimize content based on connection speed
- Memory-considerate loading - Adapt to device memory constraints
- Battery-aware loading - Respect user's battery preferences
- Hardware concurrency optimization - Scale based on CPU cores
- Save Data API integration - Honor data saver preferences
- Device class awareness - Target specific device capabilities
- React - Complete React Hooks library for adaptive loading
- Next.js - Server-side rendering with adaptive strategies
- Node.js - Backend adaptive serving examples
- Create React App - Client-side adaptive loading patterns
Explore 24+ interactive demos showcasing different adaptive loading strategies:
- React Twitter - Save Data Loading
- React Movie - Network-Aware Loading
- React Shrine - Network-Aware Code Splitting
- React YouTube - Multi-Factor Adaptive Loading
- Network-Aware Loading
- Memory-Considerate Loading
- Battery-Considerate Loading
- Hardware Concurrency Optimization
This project includes a comprehensive React Hooks library for adaptive loading:
npm install react-adaptive-hooksimport { useNetworkStatus } from 'react-adaptive-hooks/network';
import { useSaveData } from 'react-adaptive-hooks/save-data';
import { useHardwareConcurrency } from 'react-adaptive-hooks/hardware-concurrency';
import { useMemoryStatus } from 'react-adaptive-hooks/memory';import React from 'react';
import { useNetworkStatus } from 'react-adaptive-hooks/network';
const AdaptiveComponent = () => {
const { effectiveConnectionType } = useNetworkStatus();
return (
<div>
{effectiveConnectionType === '4g' ? (
<video controls>High-quality video</video>
) : (
<img src="optimized-image.jpg" alt="Lightweight content" />
)}
</div>
);
};| API | Chrome | Firefox | Safari | Edge |
|---|---|---|---|---|
| Network Information API | 61+ | 68+ (Android) | - | 76+ |
| Save Data API | 65+ | - | - | - |
| Hardware Concurrency | 37+ | 48+ | 10.1+ | 15+ |
| Device Memory API | 63+ | - | - | 50+ |
- Node.js 12+
- npm or yarn
# Clone the repository
git clone https://github.com/anton-karlovskiy/adaptive-loading-microsite.git
cd adaptive-loading-microsite
# Install dependencies
npm install
# or
yarn install
# Start development server
npm run dev
# or
yarn devnpm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run deploy # Deploy to Firebase
npm run serve # Serve locally with Firebase- Adaptive Loading - Delivering experiences optimized for user constraints
- Network Information API - Detecting connection quality
- Client Hints - Server-side device capability detection
- Progressive Enhancement - Building from core to advanced features
- Chrome Dev Summit Talk - Deep dive into adaptive loading
- Adaptive Serving Guide - Web.dev comprehensive guide
- Sophisticated Adaptive Loading Strategies - Advanced techniques
- React Adaptive Hooks - Official React hooks library
- Device Year Class - Facebook's device classification system
This microsite is built with:
- Next.js 9.1.1 - React framework with SSR
- React 16.11.0 - Component library
- Firebase Hosting - Static site deployment
- GitHub Pages - Alternative hosting
- LazySizes - Image lazy loading
- React Markdown - Documentation rendering
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Addy Osmani - Engineering Manager, Chrome DevRel
- Anton Karlovskiy - Developer, Chrome DevRel
- Live Demo: adaptive-loading.web.app
- GitHub Repository: GoogleChromeLabs/adaptive-loading
- React Hooks Library: react-adaptive-hooks
- Chrome Dev Summit Talk: YouTube Video
Built with β€οΈ by the Chrome DevRel team to help developers create better web experiences for all users.