什么是 http 标头“X-XSS-Protection”?

2024-04-09

所以我现在一直在 telnet 中玩弄 HTTP(即只需输入telnet google.com 80并放入具有不同标头的随机 GET 和 POST 等),但我遇到了 google.com 在其标头中传输的一些我不知道的内容。

我一直在翻阅http://www.w3.org/Protocols/rfc2616/rfc2616.html http://www.w3.org/Protocols/rfc2616/rfc2616.html并且没有找到谷歌似乎正在喷出的这个特定http头的定义:

GET / HTTP/1.1

HTTP/1.1 200 OK
Date: Wed, 01 Feb 2012 03:42:24 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=6ddbc0a0342e7e63:FF=0:TM=1328067744:LM=1328067744:S=4d4farvCGl5Ww0C3; expires=Fri, 31-Jan-2014 03:42:24 GMT; path=/; domain=.google.com
Set-Cookie: NID=56=PgRwCKa8EltKnHS5clbFuhwyWsd3cPXiV1-iXzgyKsiy5RKXEKbg89gWWpjzYZjLPWTKrCWhOUhdInOlYU56LOb2W7XpC7uBnKAjMbxQSBw1UIprzw2BFK5dnaY7PRji; expires=Thu, 02-Aug-2012 03:42:24 GMT; path=/; domain=.google.com; HttpOnly
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked

1000

有谁知道什么X-XSS-Protection is?


X-XSS-Protection 是 Internet Explorer 8(及更新版本)可以理解的 HTTP 标头。 此标头允许域打开和关闭 IE8 的“XSS 过滤器”,从而防止某些类别的 XSS 攻击。 IE8默认启用过滤器,但服务器可以通过设置关闭过滤器

   X-XSS-Protection: 0

也可以看看http://blogs.msdn.com/b/ieinternals/archive/2011/01/31/controlling-the-internet-explorer-xss-filter-with-the-x-xss-protection-http-header.aspx http://blogs.msdn.com/b/ieinternals/archive/2011/01/31/controlling-the-internet-explorer-xss-filter-with-the-x-xss-protection-http-header.aspx

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

什么是 http 标头“X-XSS-Protection”? 的相关文章