HTTP headers | Content-Location
The HTTP Content-Location
header is an entity-header that gives another location for the data that is returned and also tells how to access the resource by indicating the direct URL. Its usage is often confused with another HTTP Header which is Location. The main difference between them is that Location gives the URL of the resource where the redirection of the page happens while HTTP Content-Location
is used to indicate the URL of a transmitted resource.
This header accepts a single directive mentioned above and described below:
In this example, index.html is the URL which indicated the location of the content.
- <url>:This directive holds the relative or absolute URL that gives access to a resource.
In this example, teddy.xml is the URL which indicates the location of the content.
To check this Content-Location in action go to Inspect Element -> Network
check the response header for Content-Location like below.
The browsers are compatible with the HTTP Content-Location
header are listed below:
- Google Chrome
- Internet Explorer
Share your thoughts in the comments
Please Login to comment...