Will definitely consider this in the next release!
Thanks for the suggestion. I agree the Accept: text/markdown pattern is becoming more common for AI-oriented content negotiation, and I did spend some time evaluating it.
At the moment, I’m intentionally not implementing that behavior because I think the operational risk outweighs the upside for a WordPress plugin intended to run across a wide variety of hosting and caching environments.
The plugin currently uses explicit .md routes instead, which are much safer and more predictable from a caching and infrastructure perspective.
Serving Markdown conditionally from the same URL based on the Accept header introduces a number of edge cases:
- CDN/cache variation requirements (
Vary: Accept)
- Reverse proxy compatibility
- Cache poisoning or stale cache scenarios
- Hosts that ignore or mishandle content negotiation
- The possibility of Markdown accidentally being cached and served to normal browsers
On highly cached WordPress sites, especially with Cloudflare, Varnish, Nginx microcache, or aggressive edge caching, this could realistically result in broken page output if misconfigured.
Because of that, I’m currently treating .md URLs plus the existing <link rel="alternate" type="text/markdown"> output as the safer and more deterministic implementation.
I may revisit this later as an optional advanced setting, but I don’t currently feel comfortable enabling negotiated Markdown responses by default.
Thread Starter
shurup
(@shurup)
Sounds totally fair; thanks a lot for this detailed answer!
More thinking: while i’m hesitant to enable Accept: text/markdown content negotiation by default, I agree there are valid advanced use cases, so I’m considering exposing it behind a developer filter. That would let site owners explicitly opt in once they’ve confirmed their cache layer respects Vary: Accept. Do you have the ability to add in your own custom hooks?