Fiddler – How to mimic a specific browser version request?
Fiddler tool doesn’t need any introduction, it is a great tool to debug a lot of client side issues with Internet Explorer, and other browsers as well <by setting the proxy to make the connections go through fiddler>. There are a few times when you have a different version of a browser, and you want to know what the server renders for different version of browser.
Below code is very common:
// get browser version – pseudo code
var bVer = getBrowserVersion();
if(bVer == "IE6")
// IE6 specific code
else if(bVer == "IE7")
// IE7 specific code
// other version specific code
There are a plenty ways of generating a request of a specific browser version, and the easiest is just to choose from the Rules menu. Choose Rules –> User-Agents –> Select Version
I’m on Windows 7 with IE8. Let me select to mimic the browser version to be IE 7(Vista). Below is the raw request you see in the Fiddler trace:
GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)
Accept-Encoding: gzip, deflate
Other way of doing this is by using the Filters Tab which you will find it in the right hand side. I will probably write about the various things that you could perform using the Filters in a separate blog post. In fact, it would definitely need a series of posts. I will write them when I find time.