有没有办法修改 IE6 的 HTTP 标头?
我需要能够修改 Internet Explorer 的 HTTP 标头以进行测试。
基本上,我想实现与 修改标头 插件完全相同的事情Firefox 确实如此。
I need to be able to modify the HTTP headers for Internet Explorer for testing purposes.
Basically, I want to achieve the exact same thing that the Modify Headers plugin for Firefox does.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
要使用 Fiddler 修改标头:
1- 打开 Fiddler Web 调试器,然后在菜单工具栏中转到 < code>规则->
自定义规则...
(快捷键是 Ctrl + R)。 它会打开CustomRules.js
文件。 Fiddler 可能会建议您下载 Fiddler ScriptEditor,但您可以使用任何文本编辑器对其进行编辑(我使用 notepad++)2- 在脚本文件中查找
OnBeforeRequest(oSession: Session)
。3- 您可以通过将
oSession.oRequest["NewHeaderName"] = "New header value";
添加到OnBeforeRequest
函数来添加新标头。 另外,要删除标头,请使用 oSession.oResponse.headers.Remove("HeaderName"); 函数。有关更多信息,请参阅此链接
To modify the header with Fiddler:
1- Open Fiddler Web Debugger and in the menu toolbar go to
Rules
->Customize Rules...
(shortcut is Ctrl + R). It opens theCustomRules.js
file. Fiddler may suggest you to download Fiddler ScriptEditor but you can edit it with any text editor (I use notepad++)2- Find
OnBeforeRequest(oSession: Session)
in the script file.3- You can add a new header by adding
oSession.oRequest["NewHeaderName"] = "New header value";
toOnBeforeRequest
function. Also, to remove a header, useoSession.oResponse.headers.Remove("HeaderName");
function.For more information see this link
您可以安装 Fiddler 并使用 CustomRules.js 文件
You could install Fiddler and modify request headers with the CustomRules.js file
您可以使用 Charles Proxy 进行各种标头重写。 这是一个很棒的工具。
You could use Charles Proxy to do all sorts of header rewriting. It's a great tool.
Proxomitron 能够修改 IE 及其免费的标头
Proxomitron has the ability to modify headers for IE and its free