yceffort
10 POSTS

Caching 1

  • ◆ Page Preservation in Next.js Part 2
    #nextjs#memory#web-performance

    Why Did Next.js's Last Three Leave Nine Posts Behind?

    Next.js is said to preserve the last three pages, yet nine posts remained on this blog. A sequential navigation experiment measures how far preservation reaches, then looks at managing memory by separating work to stop when hidden from state worth keeping.

    16 min read
  • #pwa#caching#service-worker

    Saving Marp Slides from a Next.js App for Offline Use

    I built offline saving into a Marp slide viewer. This post follows the process from the first attempt to run the existing viewer offline as-is to fixing, one at a time, the problems that deploys, networks, and the presenter window exposed.

    Updated 23 min read
  • ◆ Page Preservation in Next.js Part 1
    #nextjs#react#debugging

    Pages You Leave Don't Die, They Hide: Next.js cacheComponents and React Activity

    Next.js 16's cacheComponents hides the pages you leave with React Activity instead of unmounting them. Following a three.js canvas that went blank after a back navigation, I read the router, React, and react-three-fiber source and reproduced it in a browser.

    34 min read
  • ◆ Service Worker Caching Deep Dive Part 3
    #service-worker#web-performance#caching

    Measuring the Cost of Going Through a Service Worker: Building in the Lab the Control Group GA4 Could Not Give Me

    I set out to confirm the 500 ms that part 2 left as the cost of going through the worker, but the hard reloads that would form the control group arrive at under one a day. With a control group built from Playwright and a shaping proxy, going through the worker cost 2 ms on a navigation. Most of the extra time on a post click came from the worker saving the post HTML in the background over the same connection, and the gap between lab and field data was a measurement definition difference caused by 103 Early Hints.

    Updated 50 min read
  • ◆ Service Worker Caching Deep Dive Part 2
    #service-worker#caching#nextjs

    Applying Service Worker Caching: App Router Traps and GA4 Field Data

    I made this blog (Next.js App Router) open offline. On the first deploy, the post I had just read would not open offline; on the second, posts opened but every image was broken. After fixing the problems from soft navigation, prefetching, and next/image one at a time, GA4 real-user data showed returning-visitor FCP 634ms faster on average and TTFB 525ms slower on average.

    Updated 27 min read
  • ◆ Service Worker Caching Deep Dive Part 1
    #service-worker#caching#browser

    How Service Worker Caching Works: The Proxy, the Lifecycle, and Five Strategies

    This post covers the service worker material that did not fit into the cache chapter of Frontend Performance Optimization Deep Dive (published in Korean). It works through why caches go stale, why the old version shows up after a deploy, what to store under which strategy, and whether you should use one at all, and measures a 104KB opaque response being counted as 6.6MB of storage.

    Updated 24 min read
  • #react#caching

    React cache() Deep Dive: Request-Scoped Memoization, Read from the Source

    Every odd rule of React's cache() falls straight out of a ~30-line implementation. We trace the dispatcher, getCacheForType, and the WeakMap/Map tree at the source level to see exactly how request-scoped memoization works.

    Updated 22 min read
  • ◆ Directive Deep Dive Part 3
    #react#nextjs#caching

    'use cache' Directive Deep Dive: To the End of Cache Boundaries

    Build-time transformations, cache key serialization, ResumeDataCache, cacheHandler, and Cache Components - everything created by a single 'use cache' line

    Updated 40 min read
  • #react#compiler#web-performance

    React Compiler Deep Dive: From Principles to Output

    A deep exploration of how React Compiler analyzes code and what it produces, from pipeline to final output.

    24 min read
  • #nextjs#caching#web-performance

    A Guide to Next.js Caching

    Exploring the four cache layers of the Next.js App Router

    45 min read