Browser API Edge Cases
Web platform features and cross-browser quirks
Start Here
Essential reads to understand the key concepts and patterns.
Service Worker Lifecycle: Why Your PWA Update Isn't Working
skipWaiting() doesn't mean instant. clients.claim() has timing gotchas. First visits don't use your SW. Master the edge cases to build reliable PWAs.
Navigation API: The Modern History API Replacement
The modern History API replacement that centralizes SPA routing into a single navigate event
View Transitions API: Cross-Document Navigation Edge Cases
Cross-document View Transitions enable native MPA animations, but 4-second timeouts, BFCache interactions, and name conflicts can break the magic.
Intersection Observer rootMargin: The Scroll Container Trap
rootMargin only expands the viewport—nested scroll containers clip your elements first. Use scrollMargin to fix lazy loading in carousels and scrollable regions.
AbortController: Patterns Beyond Fetch
AbortController isn't just for fetch—use it to cancel event listeners, timeouts, and any async operation with a single abort() call.
More Articles
AbortSignal.any(): Composing Cancellation Signals
Combine timeout, user cancellation, and navigation signals into one — without race conditions or manual cleanup.
Webpack Dynamic Import Race Conditions: The Chunk Loading Trap
Code-split chunks racing against each other cause production-only crashes. Network latency turns microsecond races into user-facing errors.
Module Federation Memory Leaks: The Shared Singleton Problem
Micro-frontends sharing React create subtle memory leaks when remotes update—old module closures retain references to shared singletons, preventing garbage collection.
IndexedDB Transaction Auto-Commit: The Await Trap
IndexedDB transactions auto-commit when the event loop has no pending requests. One await in the wrong place, and your data is inconsistent.
Web Workers Structured Clone: What Can't Cross the Boundary
Functions, DOM nodes, and class prototypes can't survive postMessage. Here's exactly what fails, what works, and the zero-copy escape hatches.
HTML Popover API: The Hidden Gotchas
The declarative popover attribute escapes z-index hell—until nested menus clash, light dismiss misfires, and focus management surprises you.
ResizeObserver: The 'Loop Limit Exceeded' Error
Benign but scary. Learn why modifying layout in a ResizeObserver callback triggers browser loop protection.