TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

"X-" deprecated for HTTP headers

133 点作者 michaelfairley将近 13 年前

14 条评论

Jach将近 13 年前
I was going to make a joke that "X-Subliminal" from <a href="http://tuxgames.com" rel="nofollow">http://tuxgames.com</a> should become "com.tuxgames.subliminal", but I see they already made it for me...<p>&#62; <i>In some situations, segregating the parameter name space used in a given application protocol can be justified:</i><p>&#62; <i>1. When it is extremely unlikely that some parameters will ever be standardized. In this case, implementation-specific and private- use parameters could at least incorporate the organization's name (e.g., "ExampleInc-foo" or, consistent with [RFC4288], "VND.ExampleInc.foo") or primary domain name (e.g., "com.example.foo" or a Uniform Resource Identifier [RFC3986] such as "<a href="http://example.com/foo" rel="nofollow">http://example.com/foo</a>). In rare cases, truly experimental parameters could be given meaningless names such as nonsense words, the output of a hash function, or Universally Unique Identifiers (UUIDs) [RFC4122].</i>
评论 #4160511 未加载
drsim将近 13 年前
Hmm... I've worked on software at three different orgs that rely on the X-Forwarded-For header to identify a client's IP address from in front of a firewall (I'm not a network guy, but I think it was Cisco equipment).<p>I agree the X- prefix ain't great. Is there an alternative for the originating IP address? If not, we need one.
评论 #4161160 未加载
评论 #4161371 未加载
yaix将近 13 年前
Good thing.<p>Next, please convince browser vendors to support HTTP methods (PUT, DELETE, etc.) in forms.
评论 #4161392 未加载
natrius将近 13 年前
Next stop: CSS vendor prefixes.
评论 #4160657 未加载
评论 #4163381 未加载
Sniffnoy将近 13 年前
More than just HTTP headers!
firlefans将近 13 年前
Firstly, I'm only discussing it's application to HTTP and I realise this is a more general rule. Customer X- headers are a hack, but they're also incredibly useful for simple debugging ala FirePHP, for transmitting application specific metadata or caching metadata in dev environments. The RFC even mentions a similar objection under three 'primary objections to deprecating the "X-" convention' - BCP 82, <a href="http://tools.ietf.org/html/bcp82" rel="nofollow">http://tools.ietf.org/html/bcp82</a>.<p>Also, this statement, "the name space is not limited or constrained in any way, so there is no need to assign a block of names for private use or experimental purposes", this is true only for application/browser vendors (native devs), web devs are stuck with X- headers for sending custom data to the browser without interrupting page output.
评论 #4160988 未加载
phibit将近 13 年前
Does anybody know what the recommended practice is?
评论 #4160336 未加载
评论 #4160329 未加载
sleepyhead将近 13 年前
What is wrong with custom http headers? Like these from Cloudfront:<p>X-Ua-Compatible: IE=Edge,chrome=1<p>X-Request-Id: 19c0a05fd28e371127a76f658203eace<p>X-Runtime: 0.002039<p>X-Content-Digest: 2c4b5e9fc815a69ecb514e41e27e6ac7f2716801<p>X-Rack-Cache: miss, store<p>X-Varnish: 1299462197<p>X-Cache: Hit from cloudfront<p>X-Amz-Cf-Id: kDpGVcaIcDVQm-PkMd_FPnR_IcPZqPgR0NxKEvmOBWKaURpeus5vEw==,_ycCBrLJT91EOYt14GTciFKKLlpzLt1cogvPpK2PkDP7QzYVGbcsGQ==
评论 #4161240 未加载
评论 #4161305 未加载
mildweed将近 13 年前
So, now we in the community need a clearinghouse to declare new HTTP headers. Let me be the first: Comment.<p><pre><code> &#60;?php header('Comment: some context on why this reply happened'); ?&#62;</code></pre>
saurik将近 13 年前
This was also discussed when it was a draft a few months ago.<p><a href="https://news.ycombinator.com/item?id=3539663" rel="nofollow">https://news.ycombinator.com/item?id=3539663</a>
pacoverdi将近 13 年前
I guess django will have to find a replacement for X-CSRFToken
评论 #4161167 未加载
SimHacker将近 13 年前
Does this mean X-Windows is finally obsolete?
评论 #4165023 未加载
jpswade将近 13 年前
...and while we're on the subject HTTPD's should return your IP address in their headers.<p>This would make IP discovery easy peasy!
shasty将近 13 年前
I dont know if this will get approved but forcing us all to integrate headers into HTTP standards is not going to work. Thats why X headers exist.<p>We need ways to move forward or e ven sideways if thats what we choose using an extension mechanism that is simple.