I am designing an HTTP API for a dataset. I want permanent links to each historical version of a file in the dataset as well as a URL that redirects to the latest version. I want to add a header to enable clients to discover the latest URL given the URL for a specific version:
GET /example/v1
200 OK
Link: </example/latest>; rel="latest"
GET /example/v2
200 OK
Link: </example/latest>; rel="latest"
GET /example/latest
303 See Other
Location: /example/v2
I want to know: is there a better value for the rel parameter than "latest" that I could/should use? Note: I am aware that I should add Link: </example/latest>; rel="canonical", but rel="canonical" captures a different semantic than I want to describe.
| rel="latest" | rel="canonical" |
|---|---|
| This is where you can find the latest version | Hint: if you are a search engine, this is the page I want you to use when grouping a set of similar results |
It is not infeasible that I may want to serve Link: </example/v2>; rel="canonical" or even Link: </example/v1>; rel="canonical"
Similar questions:
- Can a rel=canonical meta tag point to a 301 redirect URL?: How will Google handle a given scenario?
- My question: How to best communicate the semantics I want?
At the time of writing there is no suitable entry in this list on MDN