To customize Fiddler's Web Sessions Listadd rules using FiddlerScript to the OnBeforeRequest function (except where noted). For example:

Display in the "Custom Column" the time of the original request

    oSession["ui-customcolumn"] += DateTime.Now.ToString("h:mm:ss.ffff ");

Show any Set-Cookie headers in Custom column in Session list. (in OnBeforeResponse)

    oSession["ui-customcolumn"] = oSession.oResponse["Set-Cookie"];

Mark any requests which send cookies in red, and show the value in the Custom column. Otherwise, mark request in green.

    if (oSession.oRequest.headers.Exists("Cookie"))
{
oSession["ui-color"]="red";
oSession["ui-customcolumn"] = oSession.oRequest["Cookie"];
}
else
oSession["ui-color"]="green";

Hide requests for .GIFs from the session list

    if (oSession.url.EndsWith(".gif")){
oSession["ui-hide"]="hiding image requests"; //String value not important
}

Hide completed responses which returned images (in OnBeforeResponse)

    if (oSession.oResponse.headers.ExistsAndContains("Content-Type", "image/")) {
oSession["ui-hide"] = "hiding images"; // String value not important
}

Hide requests to domains except those I care about

    if (!oSession.HostnameIs("domainIcareabout.com")){
oSession["ui-hide"] = "hiding boring domains"; // String value not important
}

Unhide any response which returned a 404 (in OnBeforeResponse)

    if (oSession.responseCode == 404){
oSession.oFlags.Remove("ui-hide");
}

Flag all pages in which the server sends a cookie (in OnBeforeResponse)

    if (oSession.oResponse.headers.Exists("Set-Cookie") ||
oSession.utilDecodeResponse();
oSession.utilFindInResponse("document.cookie", false)>-1 ||
oSession.utilFindInResponse('HTTP-EQUIV="Set-Cookie"', false)>-1){
oSession["ui-color"]="purple";
}

Show redirection target Location in Session List (In OnBeforeResponse)

    if ((oSession.responseCode > 299) && (oSession.responseCode < 308)){
oSession["ui-customcolumn"] = oSession.oResponse["Location"];
}

Add image size information in a column. (Global scope) Note: you must add System.drawing.dll inside Tools > Fiddler Options > Extensions > References.

    public static BindUIColumn("ImageSize", 60)
function FillImageSizeColumn(oS: Session){
if ((oS.oResponse != null) && (oS.oResponse.headers != null))
{
try{
if (!oS.oResponse.headers.ExistsAndContains("Content-Type", "image/")) return "NotAnImage"; var oMS: System.IO.MemoryStream = new System.IO.MemoryStream(oS.responseBodyBytes);
var i:System.Drawing.Bitmap = new System.Drawing.Bitmap(oMS);
return (i.Width + " x " + i.Height);
}
catch(e) { return "err"; }
}
return String.Empty;
}

Search all text responses for a list of strings and flag sessions (in OnBeforeRequest)

    oSession.utilDecodeResponse();

    // Create a array of strings we're looking for.
var oFindStrings = new Array( "XMLHttp", "onreadystatechange", "readyState", "responseBody", "responseText", "responseXML", "statusText", "abort", "getAllResponseHeaders", "getResponseHeader", "setRequestHeader"); // For each target string, check the response to see if it's present.
var iEach=0; oSession["ui-customcolumn"]=String.Empty; for (iEach; iEach<oFindStrings.length; iEach++){
if (oSession.utilFindInResponse(oFindStrings[iEach], false)>0) {
oSession["ui-color"]="purple";
oSession["ui-customcolumn"] += oFindStrings[iEach]+"; ";
}
}

Customize Web Sessions List的更多相关文章

  1. Add Columns to the Web Sessions List

    To add custom columns to the Web Sessions List, add rules using FiddlerScript. The BindUIColumn Attr ...

  2. Web Sessions Installation

    展示不使用Terracotta DSO如何集群Web Sessions. 1.要求 1)jdk1.6或者更高版本 2)Terracotta 3.7或者更高版本 3)所有被集群的对象需要实现序列化,如果 ...

  3. The Web Sessions List

    The Web Sessions list contains the list of HTTP Requests that are sent by your computer. You can res ...

  4. Pause Web Sessions

    To pause specific sessions, add rules using FiddlerScript to the OnBeforeRequest function (except wh ...

  5. [Windows Azure] Developing Multi-Tenant Web Applications with Windows Azure AD

    Developing Multi-Tenant Web Applications with Windows Azure AD 2 out of 3 rated this helpful - Rate ...

  6. Scripting web services

    A process performed on a server includes configuring the server to enable script for a Web service t ...

  7. WEB/HTTP 调试利器 Fiddler 的一些技巧分享

    1.原理简介: Fiddler 是目前最强大最好用的 Web 调试工具之一,它能记录所有客户端和服务器的http和https请求, 允许你监视,设置 CGI 请求的断点,甚至修改输入输出数据.同类的工 ...

  8. Nginx+Tomcat+Terracotta的Web服务器集群实做

    1.准备工作两个Linux服务器,可以用VMware装一个,然后配置好再克隆一个,修改IP即可.Host1:192.168.0.79Host2:192.168.0.80先配置好jdk1.6.0和tom ...

  9. How to Customize Server Header using NginX headers-more module

    http://wiki.nginx.org/HttpHeadersMoreModule#Version headers_more When you are browsing a website, yo ...

随机推荐

  1. dwz 分页 bug (选回 combox 第一个值时不执行 onchange)

    先看一下官方的测试: 官方的演示有两个 bug 一个是combox数字一直不变,二是当选回第一个值时不执行 onchange 事件. 经过firebug调试,这是一个bug,传到后台的参数没有得到及时 ...

  2. 分布式系统唯一ID生成方案汇总 转

    系统唯一ID是我们在设计一个系统的时候常常会遇见的问题,也常常为这个问题而纠结.生成ID的方法有很多,适应不同的场景.需求以及性能要求.所以有些比较复杂的系统会有多个ID生成的策略.下面就介绍一些常见 ...

  3. hex string 换转

    hex2string std::stringstream R; R << std::hex << 0x1254; DWORD Str2Hex(string str){ retu ...

  4. Asp.Net Mvc表单提交之List集合

    一.说明 1.Asp.Net Mvc中Action的参数可以自动接收和反序列化form表单的值, 2.对于name=value类型,只要Action参数的变量名和input的name相同就行,不区分大 ...

  5. [Windows_Server_2012优化V1.1_20140425]

    [Windows_Server_2012优化V1.1_20140425] Winsows Server 2012 Datacenter Evaluation Build 9200数据中心评估版GUI ...

  6. 用SLF4j/Logback打印日志-3

    在 用SLF4j/Logback打印日志-1 和 用SLF4j/Logback打印日志-2 中分别介绍了Logback记录日志的基本原理并重点介绍了输出源配置.本篇介绍一些性能和技巧性的东西. 性能 ...

  7. 用Razor語法寫範本-RazorEngine組件介紹

    最近剛好有要寫寄Email的程式,在代碼中寫HTML覺得很呆,抽出代碼外寫到txt或html檔當範本,由程式執行時在載入檔案時用Regex換關鍵字又覺得不夠好用,而且因為有時會有要判斷一些條件,就會寫 ...

  8. C/C++ 二维数组

    使用C语言用到了二维数组 #include <iostream> #include <stdlib.h> using namespace std; ], int row){ ; ...

  9. 国外物联网平台(1):亚马逊AWS IoT

    国外物联网平台(1)——亚马逊AWS IoT 马智 平台定位 AWS IoT是一款托管的云平台,使互联设备可以轻松安全地与云应用程序及其他设备交互. AWS IoT可支持数十亿台设备和数万亿条消息,并 ...

  10. 仿qq底部的提示标记

    看到一个比較不错的开源项目,分享给大家: <?xml version="1.0" encoding="utf-8"?> <RelativeLa ...