Fiddler tool Introduction 1

Source: Internet
Author: User

I started using this tool a few days ago. I wanted to write something. I searched for it online and found someone already wrote it. So I will post it.

Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/dnwebgen/html/ie_introfiddler.asp
)

I have been using this tool for a long time, and it has helped me a lot. Today I have translated Microsoft articles, so that more friends can come to understand this good tool, this is also the first time I have translated an article. If this is not the case, please correct me more.
Introduction:

Have you ever wondered how your web programs interact with IE? Have you ever encountered some strange performance bottlenecks that you cannot solve? Are you curious about the cookies sent to the server and the cached content that you downloaded?

Fiddler website and: http://www.fiddlertool.com/Fiddler/dev/

Microsoft's Fiddler can help you answer the above questions. In addition, it is also an HTTP debugging proxy, which can
Enough to record all the HTTP Communication between your computer and the Internet, Fiddler can also let you check all the HTTP Communication, set breakpoints, and fiddle
All the "incoming and outgoing" data (such as cookies, HTML, JS, CSS, and other files, which can be modified randomly ). Fiddler
It is simpler than other network debuggers because it only exposes HTTP Communication and provides a user-friendly format.

 

Fiddler contains a simple but powerful JScript-based event script subsystem. It is very flexible and supports many HTTP debugging tasks. Fiddler is written in C.

..... Next is a piece of nonsense. For how to install it, you only need to go one way to next. In this section, I will skip and go straight to the topic.

Running fiddler

When you start Fiddler, the program will act as a system proxy for Microsoft Internet services. You can verify that Fiddler is intercepted correctly by checking the Proxy Settings dialog box. Click iesettings, tools, LAN Settings, and advanced.
 

 

As a system proxy, all HTTP requests from Microsoft Internet Service (wininet) will go through fiddle before they reach the target Web server. Similarly, all HTTP responses will flow through fiddler before returning to the client. In this way, you can understand that fiddler has many functions!

When you disable Fiddler, it automatically removes it from the system registry. In other words, once you disable Fiddler, it will not occupy the pitfalls.

 

The following is a fillder user interface. You can refer to its functions.

 

HTTP statistics view for Performance Testing Using fiddler

By displaying all HTTP communications, Fiddler can easily demonstrate which pages are used to generate a page and
Surface (that is, the big box on the left of Fiddler) users can easily use multiple choices to get the "Total weight" (page files and related JS, CSS, etc.) of a Web page) you can also easily
We can see the total number of requests to a page you requested and the number of bytes converted.

 

 

In addition, by exposing the HTTP header, You can see which pages are allowed to be cached on the client or proxy. If a response does not contain the cache-control header, it will not be cached on the client.

 

Debug with fiddler

 

Fiddler supports the breakpoint debugging concept when you go to the software menu-rules-automatic
If the breakpoints option is beforerequest, or when these request or response attributes match the target criteria, Fiddler can pause HTTP Communication,
Requests and responses can be modified. This function is very useful for security testing, and can also be used for general functional testing, because all code paths can be used for drills.

 

 

Session check

You can manually create an HTTP request in builderpage
Third of the tab on the Right of Fiddler, requestbuilder), or you can move an existing request from the session List
Builder page to execute this request again...

 

Fiddler Extension

Fiddler can be extended using. NET Framework. There are two basic mechanisms to prepare for the fiddler extension:

Customize rules and check rules.

Use scripted rules to extend fiddler

 

Fiddler supports the JScript. net engine, which allows users to automatically modify HTTP requests and responses. This engine can modify sessions in the fiddlerui on the visual interface, extract the errors you are interested in from the list, or remove sessions you are not interested in.

 

The following sample code shows how to change the page to purple when the cookie is loaded.

static function OnBeforeRequest(oSession:Fiddler.Session)
{
   if (oSession.oRequest.headers.Exists("Cookie")){
      oSession["ui-color"] = "purple";
      oSession["ui-bold"] = "cookie";
   }
}

 

Extended fiddler by adding inspectors

You can add an inspector plug-in object to compile the fiddler extension in any language in. net. Requestinspectors and responseinspectors provide a standardized format or a specified (User-Defined) HTTP request and response view.

By default, the following inspectors are added to Fiddler:

Request inspectors

[RW] headers-shows request headers and status.

[RW] textview-shows the Request body in a text box. (original request body view)

[RW] hexview-shows the Request body in a hexadecimal view. (hexadecimal view of the body)

[Ro] XML-shows the Request body as an xml dom in a tree view. (The request is displayed in XML format)

 

Response inspectors

[RW] transformer-removes gzip, deflate, and chunked encodings for easier debugging.

[RW] headers-shows response headers and status.

[RW] textview-shows the response body in a text box.

[RW] hexview-shows the response body in a hexadecimal view. (hexadecimal view)

[Ro] imageview-shows the response body as an image. supports all. Net image formats.

[Ro] XML-shows the response body as an xml dom in a tree view.

[Ro] Privacy-explains the p3p statement in the response headers, if present. (if there is a description of the Privacy Policy in the Response Header, it will be displayed)

 

If you still have some gold in this article, I will then translate the second article, advanced article of Fiddler.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.