Back to articles
Your Next.js Site Is Serving 26 KB of Noise to LLMs. Here's the Fix.

Your Next.js Site Is Serving 26 KB of Noise to LLMs. Here's the Fix.

via Dev.to WebdevKacper Siniło

LLMs are crawling your Next.js site right now. They're downloading your full HTML page — RSC payloads, hydration scripts, font preloads, inline styles, the works — just to pull out a product title, a price, and a description. 26 KB parsed. 101 bytes kept. That's not a failure of the LLM. It's a failure of the server. The Problem No One Talks About HTTP solved this decades ago. It's called content negotiation . The client sends an Accept header telling the server what format it wants. The server responds accordingly. Browser: Accept: text/html LLM agent: Accept: text/markdown API client: Accept: application/json Backend developers do this routinely. Express, Django, Rails — they all support it out of the box. Next.js doesn't. So you're stuck with two bad options: Separate endpoints like /api/products/123.md — duplicates your routing, drifts out of sync, and forces clients to know about a non-standard URL scheme. Markdown-only pages — breaks the browser experience for humans. Content Neg

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
6 views

Related Articles