AI summary by TwinMind
My Website Is Airplane Proof
Theo - t3․gg
12m 38s
Airplane Internet Performance Challenges
- Average internet speed consistently increases, but airplane Wi-Fi remains problematic
- Airplane Wi-Fi speeds: 0.1-0.2 megabits per second
- Latency issues: 1-3 seconds from request to response
- Content-heavy sites (YouTube, Twitch) perform poorly on flights
- Traditional static HTML still problematic due to ping delays on each link click
Next.js App Router Solution for Low-Bandwidth Environments
- SPA architecture beneficial in high-latency environments
- Enables earlier content fetching and preloading
- Eliminates network requests on every navigation
- Hybrid approach: static enough to load quickly, dynamic enough for quality navigation
- Next.js App Router provides this experience by default
Real-World Airplane Testing Results
- Tested on airplane with 0.2 Mbps speed, 1500ms latency
- Upload Thing website performance surprisingly good
- Navigation felt "super snappy" despite poor connection
- Immediate page loading on hover/click interactions
- Streaming enabled content to load progressively
Technical Implementation: Streaming and Suspense
- Server streams HTML shell first (non-suspense content)
- Suspense-wrapped content arrives later via same HTTP request
- Partial + streaming behavior now default in Next.js
- No special configuration required beyond standard App Router usage
Code Demonstration
- Basic layout with metadata, HTML structure, Inter font
- Async slow-loading function with intentional 3-second delay
- Suspense wrapper enables progressive loading
export const dynamic = 'force-dynamic'for always-dynamic content- Production build (
npm run start) required for proper streaming demonstration
Network Performance Analysis
- Slow 3G testing shows immediate "hi" response, delayed "slow" content
- Fast 3G demonstrates clear streaming behavior
- JavaScript disabled still works (needs JS to parse streamed responses)
- Total JavaScript payload: ~100KB across all chunks
- Actual app JavaScript: 855 bytes
- Total content transferred: 162KB for demo page
Waterfall Reduction Benefits
- Traditional approach: HTML → JavaScript download → API requests → render
- Next.js streaming: HTML + background JavaScript download + streamed response
- Reduces waterfalls from "20 to 2"
- Critical for high-latency environments where each round trip adds 1-3 seconds
- Prefetching of visible links further improves navigation
Performance Comparison
- Upload Thing (App Router): Minimal waterfalls, instant loading
- Traditional SPA: Multiple blocking JavaScript chunks, additional data fetches
- Each request blocks subsequent requests in traditional model
- New model eliminates most blocking behavior
Key Advantages Over Traditional Approaches
- Better than PHP due to dynamic loading behaviors and caching patterns
- Streaming eliminates multiple waterfalling requests
- Meaningful waterfall reduction improves high-latency performance
- JavaScript and CSS files load instantly from cache after first visit
- HTML parsing happens instantaneously without additional downloads
