7 ms·
That entirely depends on the server. A good solution would be to include Link headers in all responses: Link: /some-page rel="canonical" Link: /some-p
by 9dev 21d ago
That entirely depends on the server. A good solution would be to include Link headers in all responses:
Link: /some-page rel="canonical"
Link: /some-page.json rel="alternate" type="application/json"
Link: /some-page.html rel="alternate" type="text/html"
Link: /some-page.md rel="alternate" type="text/markdown"
- iamflimflam1 21d agoThat only works if the client looks at it. The current Claude fetch system does not.
- 9dev 21d agoShould we let vibe-coded agent harnesses dictate protocol design now..? On the flip side, I'd argue that the current centralisation of user agents (in the classical sense here) that benefit from programmatic content negotiation in form of a handful of harnesses like Claude or Codex is a great lever toward forcing the ecosystem to adopt better practices: If Anthropic added content negotiation as described in this thread to Claude, many sites would be incentivised to improve their web servers.
- _heimdall 21d agoFor the LLM use, the challenge is that it will only discover those after first requesting and parsing the HTML version. Maybe it will notice those, and maybe it will figure out the pattern for follow-up page requests, but there's no guarantee and it won't help the first request.
- 9dev 21d agoNot necessarily. They could also send a HEAD request to the URL first, to see the headers only and decide on the available alternates. I am well aware that few sites are taking that much care of their API in terms of HTTP features, but all of the problems discussed here have solid and battle-tested answers.