-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Description
MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Location
What information was incorrect, unhelpful, or incomplete?
Content-Location is used for content negotiation purposes, meaning "you can find the same content of this response at this other URL". However, one of the examples in this article shows a 201 Created response using this header to mean "you can find the created resource at this other URL".
The article about the Location header explicitly points out 201 as of the statuses where the Location header has meaning, and summarises the difference as follows (though the wording is a bit cryptic):
Locationis a header associated with the response, whileContent-Locationis associated with the entity returned.
Specific section or headline?
Pointing to a new document (HTTP 201 Created)
What did you expect to see?
I expected this example to be on the article about Location instead, and optionally a caveat in the Content-Location article that you should use Location for this purpose.
Did you test this? If so, how?
I did not test this.
MDN Content page report details
- Folder:
en-us/web/http/headers/content-location - MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Location
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/http/headers/content-location/index.md
- Last commit: 4623499
- Document last modified: 2021-08-13T16:17:49.000Z