这篇翻译不完整。请帮忙从英语翻译这篇文章

Document.referrer 返回 跳转或打开到当前页面 的页面的 URI

语法

var referrer = document.referrer;

属性值

如果用户直接打开了这个页面(不是通过页面跳转,而是通过地址栏或者书签等打开的),则该属性为空字符串。由于该属性只是返回一个字符串,所以不能够通过该属性引用页面的 DOM。

Inside an <iframe>, the Document.referrer will initially be set to the same value as the href of the parent window's Window.location.

规范

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
referrerChrome Full support 1Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

文档标签和贡献者

标签: 
此页面的贡献者: RainSlide, mdnwebdocs-bot, teoli, AlexChao, ziyunfei
最后编辑者: RainSlide,