修改http头信息
2004-09-21 00:21
375 查看
用WebHeaderCollection是无法完成的,因为其限制修改
Referer 和User-Agent
只能用注册表修改的方法
A standard user agent string would look similar to:
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Which means Internet Explorer 5.5 running on Windows 2000.
Changing the Default User Agent Values
Open your registry and find the key below. If it does not already exist then create it.
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Internet Settings/5.0/User Agent]
Create three new string values called "Compatible", "Version" and "Platform". Set them to equal what you would like to be displayed instead of "compatible", "MSIE 5.5" and "Windows NT 5.0" respectively in the example above.
You can also modify the value of "(Default)" to change the browser name "Mozilla/4.0" in the example above.
Changing the Branded User Agent String
In addition when a customized user agent string is used it may contain additional information set by the company that created a branded version of the browser. For example a branded version from an ISP may look like:
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Your_ISP_Name)
Since this information is sent to the remote web server it may be stored in the web server log files and therefore possibly used to track branded versions of a web browser.
To change it open your registry and find the key [HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Internet Settings/User Agent/Post Platform].
Each value name listed in this key will be sent to the remote web server as an additional entry in the user agent string. To remove any additional information delete the values within the [Post Platform] key. To add additional entries create a string value and name it the string you want to be sent.
Restart Internet Explorer for the changes to take effect.
Note: This tweak may affect some online services that read this information to detect the operating system such as Microsoft Windows Update.
Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.
Referer 和User-Agent
只能用注册表修改的方法
A standard user agent string would look similar to:
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Which means Internet Explorer 5.5 running on Windows 2000.
Changing the Default User Agent Values
Open your registry and find the key below. If it does not already exist then create it.
[HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Internet Settings/5.0/User Agent]
Create three new string values called "Compatible", "Version" and "Platform". Set them to equal what you would like to be displayed instead of "compatible", "MSIE 5.5" and "Windows NT 5.0" respectively in the example above.
You can also modify the value of "(Default)" to change the browser name "Mozilla/4.0" in the example above.
Changing the Branded User Agent String
In addition when a customized user agent string is used it may contain additional information set by the company that created a branded version of the browser. For example a branded version from an ISP may look like:
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Your_ISP_Name)
Since this information is sent to the remote web server it may be stored in the web server log files and therefore possibly used to track branded versions of a web browser.
To change it open your registry and find the key [HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Internet Settings/User Agent/Post Platform].
Each value name listed in this key will be sent to the remote web server as an additional entry in the user agent string. To remove any additional information delete the values within the [Post Platform] key. To add additional entries create a string value and name it the string you want to be sent.
Restart Internet Explorer for the changes to take effect.
Note: This tweak may affect some online services that read this information to detect the operating system such as Microsoft Windows Update.
{Default) | REG_SZ | Mozilla/4.0 | |||
Compatible | REG_SZ | compatible | |||
Version | REG_SZ | MSIE 5.5 | |||
Platform | REG_SZ | Windows NT 5.0 |
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion... | ||
Registry Settings |
System Key: [HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/ Internet Settings/5.0/User Agent] Value Name: (Default), Compatible, Version, Platform Data Type: REG_SZ (String Value) |
相关文章推荐
- wordpress默认http头信息X-Pingback的隐藏与修改
- IIS 7修改http头信息--删除Server、X-Powered-By等
- U-boot开机在TFT触摸显示屏输出信息的修改方法
- 如何通过源码修改手机型号等信息
- EDECMS提示信息修改
- 信息题(查询+批量删除+修改+添加)
- git 修改上次提交信息 与 撤销此操作.
- 如何修改Apache返回的头部信息
- 机房收费系统 —— 修改信息
- php 修改企业黄页中退稿信息{$infos['subject']} 的样式和内容
- iOS UITextField修改信息
- IntelliJ IDEA SVN的账号修改 信息清除
- Japan-Korea 目录 (2005.03.22/ 整理和使用ShitMp3 修改MP3信息)
- Android中Xposed框架篇-修改系统位置信息实现自身隐藏功能
- pc机取得并修改arm linux IP地址 网关 子网掩码 主机名等信息
- Jclassbin的简单用法,修改jar包class类的输出信息
- 【SharePoint】修改configure配置获取更多信息
- 富文本修改某行信息(修改办理意见)
- 【修改帐号信息】Eclipse中修改SVN用户名和密码方法
- magento后台产品超过1000个,修改分类信息无法保存