
You want to see how can Fiddler help you solve caching problems in ASP.NET. For example, enable private caching on your ASP.NET website for performance benefits. Solution. Here we use Microsoft's Fiddler tool for debugging.
1. HTTP and Fiddler
For the example, I will examine private caching in ASP.NET. I required a private cache in ASP.NET, meaning one that only the browser would keep. Then I use Fiddler to see what happens. [Fiddler Web Debugger - A free web debugging tool - fiddlertool.com]
2. Getting started
You don't need to change any code to use Fiddler, but here I show the ASP.NET code so we can see what it does. We enable ASP.NET caching and use Fiddler to make sure it works right.
3. How can I force client-side caching?
You can't. But you can allow it. You can use HttpCachePolicy in ASP.NET to indicate to the browsers that they don't need to re-download pages every time.
4. Add client caching in ASP.NET
Here we tell browsers to cache pages in their memory. This saves network accesses, and makes everything faster. Use HttpCachePolicy in ASP.NET.
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.Cache.SetExpires(DateTime.Now.AddMinutes(5));5. How can I use Fiddler?
Open it alongside Internet Explorer, Google Chrome, or Safari. Fiddler is a HTTP debugging proxy, and we use it to see HTTP connections. It is not only for ASP.NET or IIS. Similar tools are available in Firebug and Safari.
•The left side shows connections.
These connections are made. The first column shows the Result, which is 200 for HTTP success. Other codes are the famous 404, and 302.
•It uses special icons.
In the left side, blue indicates requests and green indicates downloads. You see when a page wasn't in the client-side cache.
6. Server-side caching
Servers can also cache HTML on their end, but Fiddler can't distinguish these loads. Server-cached pages will still be sent even if they haven't changed.
7. Use Fidder to check caching
You should make it so when the user clicks back, your page loads from the browser cache. Visitors click the site icon multiple times. Test this with Fiddler.
8. Use Fiddler with GZIP compression
You can use Fiddler to see how much GZIP compression would help your website. Click the radio button on the Transformer tab to count bytes.
Use HexView. You can read the raw binary in GZIP files using HexView. I used this to see the original file names in my GZIP files. This is useful for low-level server bugs.
9. Use Fiddler's ImageView
On the ImageView tab, you can see the images that are sent through HTTP. This is useful for dynamic images, such as those in ASHX handlers. [ASP.NET ASHX Handler Tutorial - dotnetperls.com]
10. Use Fiddler to examine headers
On the right side of Fiddler (which you can open by double clicking on an item in the left pane), click on Inspectors -> Headers. These are the raw HTTP headers.