The question of What’s that user agent string used for? should has been duly answered in the previous post. The next question is about How to change or spoof user agent string?
The structure of Internet Explorer user agent string.
The template of user agent string used by Microsoft Internet Explorer.
Why there is a need to change or spoof user agent string?
Well, this question should have been answered in the previous post too. In short, changing or spoofing user agent string is needed when online security is a concern or to bypass web services access restriction for certain type of web browser.
For example, Adobe Reader download site will display different download page according to the web browser that visiting the site, limit or auto pick up Adobe Reader version for the OS type in the user agent string, force Adobe Updater to manage Adobe Reader download progress. So, by changing the user agent string, one can directly download any Adobe Reader version of any platforms or languages with Internet Explorer or Mozilla Firefox, without using the Adobe Updater or Opera web browser!
How to change User Agent String of Internet Explorer?
For Internet Explorer 6 SP2 on Windows 2000 and IE7 For Windows XP, open up Windows Registry Editor to locate this Registry key:
HKLMSoftwareMicrosoftWindowsCurrentVersionInternet Settings5.0User Agent
and change the Version string value to Opera/9.21. If the Version key is not there, create the Version key of REG_SZ type (string type) with the spoofing user agent string value (i.e. Opera/9.21)!
For IE7 in Windows Vista, you can just copy and paste these Reg commands in the Vista Command Prompt and press ENTER:
To add the Version key with a spoofing user agent string value:
%windir%System32cmd.exe /k %windir%System32reg.exe ADD “HKLMSoftwareMicrosoftWindowsCurrentVersionInternet Settings5.0User Agent” /v Version /d “Opera/9.2.1” /f
To delete the Version key and revert back to original user agent string value:
%windir%System32cmd.exe /k %windir%System32reg.exe DELETE “HKLMSoftwareMicrosoftWindowsCurrentVersionInternet Settings5.0User Agent” /v Version /f
How to change User Agent String of Opera 9.21 web browser?
1. Type opera:config in the Opera address bar and press ENTER,
2. Type Spoof UserAgent ID in the text-box next to Show All
3. Change the Spoof User Agent ID to any one of these supported user agent string:
1 = Opera (default user agent string of Opera)
2 = Mozilla
3 = Internet Explorer
4 = Mozilla, Opera not mentioned
5 = Internet Explorer, Opera not mentioned
4. Save the change made before exit and restart Opera 9.21
How to change User Agent String of Mozilla Firefox?
1. Type about:config in the Mozilla Firefox address bar and press ENTER,
2. Type general.useragent.extra.firefox in the Filter bar,
3. Double-click on the returned Firefox setting, where you can change or spoof a user agent string to overwrite the default “Firefox/22.214.171.124”