Simulating network latency with Fiddler

Fiddler is one of my favourite web development debugging tools on Windows because it makes it easy to watch what’s happening in your website at the HTTP level. It is an easy to use proxy that can capture all of the HTTP traffic between your machine and the server and show it to you in its raw glory.

One of the really tricky things you can do with it is simulate network latency. This is possible because Fiddler has an autoresponder feature that can create a canned response to a request to a url.

To set one up, Fiddler has an autoresponder tab. You need to tick the “Enable automatic responses”, “Unmatched requests pass through” and “Enable latency” checkboxes to turn it on and to start meddling with requests.

The easiest way to create a new autoresponder is to load your webpage up in a browser and get fiddler to capture the traffic. Then you can drag the request that you want to simulate network latency on into the autoresponder window. Make sure that you’re capturing responses with a 200 HTTP code and not ones that return a 304 “load from cache” response.

Then right click on the autoresponder, choose “set latency” and enter in how long you’d like the request to take in milliseconds. To verify that it has worked, use the network tab in Firebug to watch your page download.

Posted on 11 Jul 12 by Helen Emerson (last updated on 14 Jul 12).
Filed under Tools, Web development