I run eSIMLane, a travel eSIM price comparison site built with Next.js (App Router) and deployed to Cloudflare Workers via OpenNext. It has around 1,150 prerendered pages.
When I checked my analytics, ChatGPT turned out to be my main source of real visitors, while Google sent almost nobody. Since AI assistants matter that much to me, I fetched a few pages the way a simple crawler would (plain HTTP, no JavaScript) and read the raw HTML.
Inside <main>, there were only skeleton blocks: grey aria-hidden placeholder divs. All the actual content (price tables, quick answers, FAQs) was in the document, just pushed down after the footer inside a block like this:
<div hidden id="S:0">
…the whole page…
</div>
<script>$RC("B:0","S:0")</script>
$RC is React's streaming helper. In a browser it moves the hidden segment up into the Suspense boundary as soon as the script executes. A crawler that skips JavaScript gets a skeleton in <main> and the real content in a hidden block at the bottom of the HTML. Every page I checked looked like this.
To be clear about how bad this was: the text was still in the file. A crawler that simply strips tags reads it fine, just after the footer, and ChatGPT was already sending me visitors before I fixed it. The risk is with tools that try to extract the "main content" of a page: they look at <main> / <article> first and may skip elements marked hidden. For those, my pages were a skeleton plus a footer. I can't say which AI crawlers work that way, so I treated it as a risk worth removing, not as the reason for missing traffic.
.tsx is a Suspense boundary
I originally added app/[locale]/.tsx so client-side navigation would show a nice skeleton. What I hadn't realized is that Next.js also wraps the page in <Suspense fallback={< />}> when generating prerendered HTML.
Because my pages are async server components, the shell (layout, header, footer, skeleton) resolves first during prerendering and gets written to the HTML first. The page body resolves right after and streams into the same file as a hidden segment paired with $RC. Even a fully static page with no request-time network calls ended up shipping as "skeleton first, real content later."
git rm 'src/app/[locale]/.tsx'
Deleting that one file was enough, and the content started rendering directly inside <main>. To verify, I counted the hidden segments left in the build output:
grep -l 'hidden id="S:' .next/server/app -r --include=*.html | wc -l
On /en/esim/turkey, <main> now starts around byte 16.5K, the content at ~23.5K, and the <footer> at ~395K, which is the order it should have been in all along.
The trade-off is that client-side navigation loses its skeleton if a prefetch misses. For a mostly static content site, I'm fine with that. If your pages are read by anything that doesn't run JS (AI crawlers, link previews, read-it-later and "page to Markdown" tools), it's worth curling a URL and checking whether <main> actually contains text.
While poking around in the raw HTML, I noticed the file sizes. My provider-vs-provider comparison page was 2.44 MB uncompressed.
With the App Router, a static page sends everything twice: once as HTML, and once as the RSC payload (a JSON-like copy of the tree inside <script> tags for hydration). Any markup you repeat in a long table gets counted twice. One comparison page had 759 "Buy" buttons, and every single button carried an inline Lucide <svg> arrow icon plus a ~250-character Tailwind class string. Repeating 759 × (SVG + classes) × 2 adds up fast.
To cut that down:
.btn-buy class inside @layer components instead of repeating a long utility string 759 times. Keeping it in
@layer components {
.ico { display:inline-block; width:1rem; height:1rem;
background:currentColor; mask:var(--i) center/contain no-repeat; }
.ico-check { --i:url("data:image/svg+xml,…"); }
}
<span class="ico ico-check" aria-hidden> takes only a few dozen bytes, still inherits currentColor like the SVG did, and defines the SVG data URL once in the stylesheet.
<details> block containing the coupon code, a copy button, and terms, so I changed it to render that content only after the toggle event fires.
Uncompressed HTML before and after:
| Page | Before | After |
|---|---|---|
| Comparison page | 2.44 MB | 1.71 MB |
| Provider page | 1.15 MB | 559 KB |
| Country page | 618 KB | 447 KB |
The transfer size gain is smaller because gzip and brotli already compress repeated SVGs and class strings pretty well, though the browser still has less HTML and RSC payload to parse. Shrinking the comparison page much further would mean the table via a client-side fetch, and for a page meant to be read by crawlers, that felt like the wrong trade.
.tsx affects static HTML output, not just client transitions, so it's always worth checking what a non-JS reader actually receives. Inside App Router tables, repeated icons and long class strings cost you twice in HTML and RSC payload, and @layer components is the cleanest way to extract repeated component styles without fighting Tailwind utilities.
I wrote this post with AI assistance and checked the facts and numbers against my own build output and commit history before publishing.