请求首部 From
中包含一个电子邮箱地址,这个电子邮箱地址属于发送请求的用户代理的实际掌控者的人类用户。
如果你在运行一个机器人代理程序(比如爬虫),那么 Form 首部应该随请求一起发送,这样的话,在服务器遇到问题的时候,例如机器人代理发送了过量的、不希望收到的或者不合法的请求,站点管理员可以联系到你。
不可以将 From 首部用于访问控制或者身份验证。
Header type | Request header |
---|---|
Forbidden header name | no |
语法
From: <email>
指令
- <email>
- 一个机器可识别的电子邮箱地址。
示例
From: webmaster@example.org
规范
Specification | Title |
---|---|
RFC 7231, section 5.5.1: From | Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |
浏览器兼容性
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.