perf(storefront): stop paying a Worker round trip for server islands on every static page view#291
What happened
Prerendered pages still fire two uncached server-island fetches per view: _server-islands/UserProfile and _server-islands/SidebarUserSection.
- Both respond with
cache-control: no-store,cf-cache-status: BYPASS - Measured TTFB from UB: 0.8s cold-ish, up to 1.6s under load on one run
- That is two Worker invocations per page view for data that only matters to signed-in users
They do not block paint, so impact is moderate, but anonymous visitors pay this on every single navigation.
Plan
Either:
- Return a short-TTL
privatecache response for the anonymous case so repeat views hit the browser cache, or - Replace the island with a tiny client-side session probe and render the sidebar shell statically.
Acceptance criteria
- Anonymous repeat page views make zero server-island Worker invocations
- Signed-in state still renders correctly after client reconciliation