Progressive Enhancement
Progressive enhancement is a strategy that emphasizes core functionality first, then layers on enhanced experiences for users with modern browsers and fast connections.Philosophy
Progressive enhancement is a strategy in web design that puts emphasis on web content first, allowing everyone to access the basic content and functionality of a web page, whilst users with additional browser features or faster Internet access receive the enhanced version instead.React Router embraces progressive enhancement by building on HTML fundamentals, making apps that work before JavaScript loads.
Why It Matters
Performance
100% of users have slow connections 5% of the time Even with fast internet, network conditions vary. Progressive enhancement ensures your app works during those critical moments.Resilience
Everybody has JavaScript disabled until it loads Your app should function before JavaScript finishes downloading and parsing.Simplicity
Building progressively is often simpler Starting with HTML forms and URLs reduces complexity and state management.Forms Without JavaScript
Forms work before JavaScript loads:With JavaScript: Client-side handling with
useFetcher
Progressive Form Enhancement
Layer on client-side features:After JavaScript: Inline submission with loading state
Links Without JavaScript
Navigation works before JavaScript:With JavaScript: Client-side routing with transitions
Search Without JavaScript
Build a search that works progressively:/search?query=...With JavaScript: Client-side navigation
Enhanced Version
Add loading states:URL as State
Use URLs instead of client state:- Works without JavaScript
- Shareable URLs
- Browser back/forward
- No state synchronization
Pagination
Build pagination that works progressively:Enhanced Pagination
Add optimistic UI:Tabs Without JavaScript
Tabbed interfaces work via URLs:Optimistic UI
Show immediate feedback before server responds:File Uploads
Handle file uploads progressively:Performance Benefits
Progressively enhanced apps load faster:Testing Progressive Enhancement
Disable JavaScript
Test in your browser:- Open DevTools
- Settings → Debugger → Disable JavaScript
- Reload page
- Verify core functionality works
Slow 3G Testing
- Open DevTools
- Network tab → Throttling → Slow 3G
- Test user experience during loading
Automated Testing
Best Practices
- Start with HTML: Forms, links, URLs first
- Layer JavaScript: Add interactivity progressively
- Test both states: With and without JavaScript
- Use semantic HTML: Proper form elements and ARIA
- Prefer URLs: Over client-side state