Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

Referer header

BaselineWidely available

The HTTPRefererrequest header contains the absolute or partial address from which a resource has been requested.TheReferer header allows a server to identify referring pages that people are visiting from or where requested resources are being used.This data can be used for analytics, logging, optimized caching, and more.

When you click a link, theReferer contains the address of the page that includes the link.When you make resource requests to another domain, theReferer contains the address of the page that uses the requested resource.

TheReferer header can contain anorigin,path, andquerystring, and may not containURL fragments (i.e.,#section) orusername:password information.The request'sreferrer policy defines the data that can be included. SeeReferrer-Policy for moreinformation andexamples.

TheReferer should also be sent in requests following aRefresh response (or equivalent<meta http-equiv="refresh" content="...">) that causes a navigation to a new page, if permitted by the referrer policy.

Note:The header name "referer" is actually a misspelling of the word "referrer".SeeHTTP referer on Wikipedia for more details.

Warning:This header may have undesirable consequences for user security and privacy.SeeReferer header: privacy and security concerns for more information and mitigation hints.

Header typeRequest header
Forbidden request headerYes

Syntax

http
Referer: <url>

Directives

<url>

An absolute or partial address of the web page that makes the request.URL fragments (i.e.,#section) and user info (i.e.,username:password inhttps://username:password@example.com/foo/bar/) are not included.Origin, path, and query string may be included, depending on thereferrer policy.

Examples

http
Referer: https://developer.mozilla.org/en-US/docs/Web/JavaScriptReferer: https://example.com/page?q=123Referer: https://example.com/

Specifications

Specification
HTTP Semantics
# field.referer

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp