在哪里可以找到标准 HTTP 标头值列表?
我正在寻找网络服务器通常会收到的所有当前标准标头值。 一个例子是“当来自运行 OS X Leopard 和安装了 Camino 的 Mac 时,标题会是什么样子?” 或者“当来自运行 Firefox 3.0.1 的 Fedora 9 与运行 Konqueror 的 SuSe 时,标头会是什么样子?”
PConroy 给出了 < a href="http://jquery.thewikies.com/browser/test.html" rel="nofollow noreferrer">来自 JQuery 的示例 倾向于我正在寻找的内容。 我想要的是实际的示例标题。
I'm looking for all the current standard header values a web server would generally receive. An example would be things like "what will the header look like when coming from a Mac running OS X Leopard and Camino installed?" or "what will the header look like when coming from Fedora 9 running Firefox 3.0.1 versus SuSe running Konqueror?"
PConroy gave an example from JQuery tending towards what I'm looking for. What I want though are the actual example headers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
您是否尝试过 RFC ? 它拥有所有这些信息。
实际上,当搜索任何协议或标准的信息时,请尝试先搜索RFC。
干杯。
Did you try the RFC? It has all that information.
Actually, when searching for information on any protocol or standard, try to search for the RFC first.
Cheers.
不存在一成不变的用户代理值列表。 您可以找到冗长的列表(例如 这个 使用的 JQuery 浏览器插件)。
关于其他 HTTP 标头,这篇 wikipedia 文章 是一个很好的起点。
There is no set-in-stone list of user agent values. You can find lengthy lists (such as this one used by the JQuery browser plugin).
Regarding other HTTP Headers, this wikipedia article is a good place to start.
关于用户代理,这完全取决于应用程序的创建者。 请参阅这篇半开玩笑的用户代理的历史 。 总之,确实不存在一组规范的值。 基于 Microsoft 的用户代理可能会根据本地计算机上安装的软件(.NET Framework 的版本等)而变化。
With regards to user-agent, that is entirely up to the creator of the application. See this semi tongue-in-cheek history of user-agent. In summary, there really isn't a canonical set of values. Microsoft based user-agents may change based on software installed on the local machine (version of .NET framework, etc).
IANA 跟踪 HTTP 标头
其中包括:
消息标头
这里是 最初基于 RFC 4229 的详尽列表
IANA keeps track of HTTP headers
Which includes:
Message Headers
Here's the exhaustive list which was originally based on RFC 4229
对于用户代理,通过 Google 快速搜索即可找到此网站。
For the user agent, a quick google search pulled up this site.
HTTP 标头列表可以在 W3 网站上轻松获得:
PConroy 也链接到维基百科页面,更简洁,格式更简单:
然而,“User-Agent”标头是一个坏例子,因为没有设置响应; 用户代理字符串由客户端决定,因此它实际上可以是任何内容。 有一个非常全面的用户代理列表可用,但它不一定会涵盖任何可能的选项,因为即使某些工具栏和应用程序可以修改 Internet Explorer 或其他浏览器的用户代理。
The list of HTTP headers is easily available on the W3 website:
PConroy also linked to the wikipedia page, which is more concise, and a little easier formatted:
However, the "User-Agent" header is a bad example, since there's no set response; the user-agent string is decided by the client so it can literally be anything. There's a very comprehensive List of User Agents available, but it's not necessarily going to cover any possible option, since even some toolbars and applications can modify the user-agent for Internet Explorer or other browsers.
O'Reilly 的花栗鼠书很好 Chris Shiflett 的 HTTP 参考。
哦,哎呀,这不是花栗鼠。 这是一只十三纹地松鼠。
The chipmunk book from O'Reilly is good as is Chris Shiflett's HTTP reference.
Oh, whoops, it's not a chipmunk. It's a thirteen-lined ground squirrel.