Service Worker Caching Strategies: Cache-First, Network-First, and SWR
The best network request never happens. Service workers intercept and serve from cache. Here are the three Workbox caching strategies and when to use each.
7 posts
The best network request never happens. Service workers intercept and serve from cache. Here are the three Workbox caching strategies and when to use each.
Three resource hints, three different jobs. Using the wrong one wastes bandwidth and slows the current page. How each one works and when to apply it.
The browser cannot paint until it builds the CSSOM. CSS in an external file means a round trip before the first pixel. Inlining critical CSS removes that.
Domain sharding, CSS sprites, and JS concatenation were correct for HTTP/1.1. HTTP/2 turned them into anti-patterns. Here is what changed and why.
The correct image for any device depends on viewport width, pixel density, and connection speed. srcset and sizes make that computable at the HTML level.
Google's profiling found 30-50% of bandwidth goes to below-fold images. loading="lazy" defers them, but two cases where it actively hurts LCP.
Parse → DOM → CSSOM → Layout → Paint → Composite. What the main thread does each frame, what jank physically is, and how to stop causing it.