A link on notifio.app/help looks like a link. It is a link, with a real href, and it works with JavaScript off. But clicking it does not do what the browser does with a link: the App Router intercepts it, fetches a React Server Components payload, and swaps the page out underneath you.

I have measured what that prefetching costs in bytes before. I had never measured the transition itself: how long the old page stays on screen, what the browser thinks happened, and what a reader who is not looking at the screen is told.

The setup

/help carries 18 internal links, 4 in the nav and 14 in the footer, and zero live regions:

> document.querySelectorAll('a[href^="/"]').length 18 > [...document.querySelectorAll('nav a')].map(a => a.getAttribute('href')) ["/", "/alerts", "/pricing", "/download"] > document.querySelectorAll('[aria-live],[role="status"],[role="alert"],output').length 0 

To time the swap I ran a requestAnimationFrame loop that records the state of the page on every frame, started it, clicked the link, and read the log afterwards:

window.__frames = []; const t0 = performance.now(); const tick = () => { const h = document.querySelector('h1'); window.__frames.push([performance.now() - t0, location.pathname, document.title, h ? h.textContent.trim() : null]); if (performance.now() - t0 < 6000) requestAnimationFrame(tick); }; requestAnimationFrame(tick); 

The first answer was wrong by a factor of nine

My first instrument was a MutationObserver on the <title> element and another on document.body, and it reported that footer links took 1,870 ms to change the heading. That is a terrible number, and it is also fiction.

Two reasons. First, the App Router does not edit the title, it replaces the whole <title> element, so an observer attached to the old one never fires again. Second, my body observer fired on the first mutation whose h1 text differed, and on a page that is still prefetching links in the background, that is not the mutation I thought it was.

The frame log has no such problem. It just asks the page what it looks like, 120 times a second.

57 to 267 milliseconds, all three at once

Click URL changes Title changes h1 changes Longest frame gap
/help to /alerts 58 ms 58 ms 58 ms 29 ms
/guides to /guides/rental-scams-netherlands 57 ms 57 ms 57 ms 29 ms
/alerts to /alerts/kamernet 61 ms 61 ms 61 ms 33 ms
/help to /about 75 ms 75 ms 75 ms 35 ms
/help to /terms 199 ms 199 ms 199 ms 28 ms
/help to /pricing 267 ms 267 ms 267 ms 38 ms

Every row has the same number three times. The path, the document title and the first heading all change in a single animation frame, which means there is no window in which the URL says /pricing and the content still says Help, and no window in which a new heading sits above an old tab title. That is worth knowing before you add a loading state: there is nothing to put one over.

The longest gap between consecutive frames during the transition is 28 to 38 ms, so no single frame blocks long enough to feel like a stall even on the slowest of these.

The spread between 57 and 267 ms is not random. The fast rows are destinations that were already prefetched. /pricing is the slowest, and it is one of the three pages on this site that cannot be served from a cache at all, because it renders per request to put a price in the visitor's currency on it. A prefetch cannot help a no-store response.

The browser does not think a navigation happened

> performance.getEntriesByType('navigation').length 1 

Still one, after every click. Across 10 destinations the number of document requests was zero every time. The consequences are easy to list and easy to forget:

What the click costs in requests

The swap is cheap. The prefetching that follows it is not, because the new page immediately starts fetching its own links:

Destination RSC requests Bytes
/pricing 21 70,604
/download 23 81,855
/alerts 27 125,255
/about 43 242,008
/terms 43 242,008
/privacy 43 242,008
/alerts/kamernet 51 288,800
/compare 57 312,631
/guides 68 376,050

The homepage is missing from that table on purpose: clicking the logo produced exactly one RSC request, and my capture hook read its body as empty because the response is streamed, so I have no honest byte count for it.

One click on a footer link to /guides produces 68 requests and 376 KB. The three legal and about pages produce byte-identical totals of 242,008, because they are three pages with the same shape: a column of text and the same footer, so the set of links they prefetch is the same set.

The part I cannot defend

After every one of those ten clicks:

> document.activeElement.tagName "BODY" > document.activeElement.matches(':focus-visible') false > window.scrollY 0 > document.querySelectorAll('[aria-live],[role="status"],[role="alert"]').length 0 

Scroll going to 0 is right. The other three lines are the whole accessibility story of client-side routing on this site.

A keyboard user who tabs to "Pricing" in the nav and presses Enter arrives on a new page with focus on <body>. Their next Tab starts from the beginning of the document, which on this site means going through the nav again before they reach anything they have not already read. There is no skip link, which the accessibility census already found, and this is the case where it would earn its keep.

A screen reader user gets less than that. A real navigation makes the browser announce the new page. A client-side route change is a DOM update, and a DOM update that nothing marks as a live region is silent. The title is correct within 60 ms and nothing reads it out. Our 402 headings have no ids either, so there is not even an in-page target to send focus to.

The fix is small and I now know exactly what it has to do, because the measurement says the content is in place in one frame:

  1. a polite live region in the root layout that receives the new page's title on every route change
  2. focus() on the new page's h1, with tabIndex={-1} so it can take focus without becoming a tab stop
  3. a skip link, which only makes sense once focus is somewhere predictable

That is three small pieces of work, and until this measurement I would have guessed the problem was speed. The transition is 57 ms. The problem is that nobody is told it happened.

Notifio is at notifio.app. The pages used in this post are /help, /alerts, /guides and /pricing, and you can run the frame log above in a console on any of them.