Capturing (and changing) a Web Site with Fiddler

Often, the IE team will encounter a problem in a complicated production website, and will need to "reduce the repro" in order to determine the root cause of a given bug. This is made more complicated by the fact that sometimes the live website will change under us and we may lose the repro before the bug is fixed.

One of the common approaches we use to solve this problem is to collect a traffic capture of the website and store it in a local archive. Then, you can use Fiddler to "replay" that traffic back at any time, even modifying the traffic to simplify the repro.

To do this:


1>     Clear your browser cache.

2>     Start Fiddler.

3>     Visit the site.


At this point, you have all of the traffic. There are a bunch of different approaches you can take, but because HTTP headers are often important, your best bet is to:


4>     File > Save Session Archive Zip.


This will save a Fiddler SAZ file containing your traffic. You can import this SAZ file into Fiddler’s AutoResponder tab and play it back to future clients, without hitting the web. (This is how I do demos at conferences without fear of losing network connectivity).


Now, that will give you playback of your captured traffic, but you mentioned that you want to “reduce” the repro.  This is easy enough. You can use Breakpoint Debugging, but for higher-volume manipulations:


5>     Choose the session that you want to change in the session list.

6>     Right-click, File > Save > Response >  Entire Response.

7>     Save it somewhere.

8>     Edit it with notepad or whatnot. You should delete the Content-Length header entirely if you plan to change the body size.

9>     Drag drop that file from Windows Explorer to Fiddler’s AutoResponder tab.

10> Move that rule to the top of the list by selecting it and pushing the + key.


Now, Fiddler will playback your locally modified URL for that file, and play everything else back based on the prior capture.



Comments (2)

  1. Gregor Suttie says:

    How do i use the AutoResponder tab to replay the content saved in the saz file?

  2. @Gregor: Click the IMPORT button near the top of the tab.

Skip to main content