Fiddler Extensibility: Flagging ASP.NET Performance Problems

 Alik Levin    Although Fiddler PowerToy - Part 2: HTTP Performance is quite dated article about Fiddler, I constantly find very useful and practical gems in it. Flagging performance problems by coloring outstanding requests is one of them.

Quick Resource Box

In the article Eric Lawrence, the author and the creator of the Fiddler tool, shares simple technique of adding custom rules that color outstanding request – be it improper caching or large payload.

Adding Custom Rules To Fiddler

I am using Fiddler v. To add customer rules follow these steps:

  • Click Rules in the menu.
  • Click Customize Rules… or Ctrl+R.
  • You should see CustomRules.js opened in Notepad.
  • Scroll down to the line with the following function:

static function OnBeforeResponse(oSession: Session)

  • Add the following lines to the function (taken from the article):

// Flag files over 25KB
   if (oSession.responseBodyBytes.length > 25000)
      oSession["ui-color"] = "red";
      oSession["ui-bold"] = "true";
      oSession["ui-customcolumn"] = "Large file";

// Mark files which do not have caching information
if (!oSession.oResponse.headers.Exists("Expires") &&
      oSession["ui-color"] = "purple";
      oSession["ui-bold"] = "true";
      oSession["ui-customcolumn"] = "Review Caching";

  • Save the file by pressing Ctrl+S, and close the Notepad.

Testing Fiddler Custom Rules

To test the Fiddler custom rules just navigate to the site you want to inspect. Here is what I get after navigating the home page of my blog:


Highlighting potential performance problems helps quickly focus on it and start improving. Notice the request #3 colored in red – it exceeds 25 KB limit. Request #8 does not have caching header defined for it – colored in purple. Notice also the comments in Custom column. I could go further and and fine tune it, for example filter out 404, etc.

Conclusion and Recommendations

Recent announcement from Google that it incorporates performance into ranking algorithm makes the performance a serious  competitive advantage. I can easily imagine new breed Google performance consultants stealing a pie from SEO consultants. I guess it’d be a good move for any SEO consultant to get perf under their belt. Using Fiddler  makes it really easy.

Related Books

    Related Posts

    Comments (2)
    1. Rick says:

      Very nice idea!

      I could imagine extending it to include a number of perf-related guidelines, such as headers that aren’t required (like "Server"), use of ETag, etc.

    2. Alik Levin says:

      Rick, thank you! All the credits go to Eric of course. 🙂

      Yes, it’s sounds like great idea – creating a set of rules for common perf issue. I’d streamline perf inspection of web sites, making it real fun 🙂

    Comments are closed.

    Skip to main content