W3cubDocs

/HTTP

Content-Location

The Content-Location header indicates an alternate location for the returned data. The principal use case is to indicate the URL of the resource transmitted as the result of content negotiation.

Location and Content-Location are different: Location indicates the target of a redirection (or the URL of a newly created document), while Content-Location indicates the direct URL to use to access the resource, without the need of further content negotiation. Location is a header associated with the response, while Content-Location is associated with the entity returned.

Syntax

Content-Location: <url>

Directives

<url>
A relative (to the request URL) or absolute URL.

Examples

Content-Location: /index.html

Specifications

Specification Title
RFC 7231, section 3.1.4.2: Content-Location Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

Browser compatibility

Feature Chrome Firefox Edge Internet Explorer Opera Safari
Basic Support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Edge mobile Firefox for Android IE mobile Opera Android iOS Safari
Basic Support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

See also

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Location