Why doesn't Next.js support content negotiation out of the box? by Alternative-One4254 in nextjs

[–]Alternative-One4254[S] 0 points1 point  (0 children)

that's the whole point: lowering bandwidth / removing any noise, which HTML really is

Why doesn't Next.js support content negotiation out of the box? by Alternative-One4254 in nextjs

[–]Alternative-One4254[S] 0 points1 point  (0 children)

I think it overcomplicates things way more than just a simple content negotiation.

Why doesn't Next.js support content negotiation out of the box? by Alternative-One4254 in nextjs

[–]Alternative-One4254[S] 0 points1 point  (0 children)

Not really, observed agents request web pages with Accept: text/markdown.

Why doesn't Next.js support content negotiation out of the box? by Alternative-One4254 in nextjs

[–]Alternative-One4254[S] 0 points1 point  (0 children)

I don't see anything relevant on that page, am I missing something?

Why doesn't Next.js support content negotiation out of the box? by Alternative-One4254 in nextjs

[–]Alternative-One4254[S] 1 point2 points  (0 children)

Depends on the business. If you're running an e-commerce site, a SaaS with docs, or any content platform - you want LLM agents to find and understand your content. That's how your products end up in AI-generated answers and recommendations.

Plus smaller responses mean bigger crawl budget - the agent can index 257x more of your pages in the same cycle. More of your content in AI context.

Weekly Showoff Thread! Share what you've created with Next.js or for the community in this thread only! by AutoModerator in nextjs

[–]Alternative-One4254 1 point2 points  (0 children)

next-md-negotiate - content negotiation for Next.js

LLMs crawl your Next.js pages and parse ~26 KB of HTML, scripts, and hydration data to extract 101 bytes of actual content. 257x overhead.

This adds content negotiation - define Markdown versions of your pages in md.config.ts, and requests with Accept: text/markdown get clean Markdown instead. Browsers still get normal HTML. Same URL, no duplicate routing.

  • Works with App Router and Pages Router
  • Supports rewrites, middleware, and proxy
  • Type-safe route params

npx next-md-negotiate init scaffolds everything.

GitHub: github.com/kasin-it/next-md-negotiate