Skip to main content

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:
Without JavaScript: Standard form submission
With JavaScript: Client-side handling with useFetcher

Progressive Form Enhancement

Layer on client-side features:
Before JavaScript: Full page reload
After JavaScript: Inline submission with loading state
Navigation works before JavaScript:
Renders as:
Without JavaScript: Browser navigation
With JavaScript: Client-side routing with transitions

Search Without JavaScript

Build a search that works progressively:
Without JavaScript: Submits to /search?query=...
With JavaScript: Client-side navigation

Enhanced Version

Add loading states:

URL as State

Use URLs instead of client state:
Benefits:
  • 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:
  1. Open DevTools
  2. Settings → Debugger → Disable JavaScript
  3. Reload page
  4. Verify core functionality works

Slow 3G Testing

  1. Open DevTools
  2. Network tab → Throttling → Slow 3G
  3. Test user experience during loading

Automated Testing

Best Practices

  1. Start with HTML: Forms, links, URLs first
  2. Layer JavaScript: Add interactivity progressively
  3. Test both states: With and without JavaScript
  4. Use semantic HTML: Proper form elements and ARIA
  5. Prefer URLs: Over client-side state

Common Patterns

Autocomplete