Rules you need for Fiddler

Michael Schwarz on Tuesday, December 5, 2006

From time to time I install Fiddler [1] on new PCs and everytime I have the same problem: which rules do I need to get most from Fiddler. Here are my top 5 rules [2] I use:

<li>In OnBoot() I use following two lines to display the raw request and response inspectors:<br><em>FiddlerObject.UI.ActivateRequestInspector(&quot;Raw&quot;);<br>FiddlerObject.UI.ActivateResponseInspector(&quot;Raw&quot;);<br></em></li><li>To disable RSS traffic I search for the user agent and hide the sessions (for Office 2007 and Internet Explorer 7), put following lines in OnBeforeRequest:<br><em>if (<br>&nbsp;&nbsp;&nbsp; oSession.oRequest[&quot;User-Agent&quot;].indexOf(&quot;Windows-RSS-Platform&quot;) &gt;= 0 || <br>&nbsp;&nbsp;&nbsp; oSession.oRequest[&quot;User-Agent&quot;].indexOf(&quot;MSOffice 12&quot;) &gt;= 0<br>&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp;oSession[&quot;ui-hide&quot;] = &quot;true&quot;;<br></em></li><li>To simulate a slow modem connection I use following lin in OnBeforeRequest and OnBeforeResponse:<br><em>oSession[&quot;request-trickle-delay&quot;] = &quot;300&quot;;<br>oSession[&quot;response-trickle-delay&quot;] = &quot;150&quot;;<br></em></li><li>When I&#39;d like to test my web site without cookies enabled I add following line in the OnBeforeRequest method:<br><em>oSession.oRequest[&quot;Cookie&quot;]=&quot;&quot;;<br></em></li><li>To allow hand-editing an ASP.NET AJAX request I add a break in the OnBeforeRequest (the same I do for the response):<br><em>if(oSession.oRequest.headers.ExistsAndContaines(&quot;Content-Type&quot;, &quot;application/json&quot;) {<br>&nbsp;&nbsp;&nbsp; oSession[&quot;x-breakrequest&quot;] = &quot;Break for JSON request&quot;;<br>}</em></li> If you are using IIS on Windows XP/2000 you should check if the Reuse connections to servers (improved performance) is disabled because Windows XP/2000 does not allow more then 10 concurrent requests.