Search

1/07/2009

Fiddler Web Debugger - Script Samples

Fiddler Web Debugger - Configuring clients 這邊有寫如何讓 fiddler 也可以紀錄 firefox 的 http request. 基本上只要把 proxy 指到 127.0.0.1:8888 或者把 proxy.pac 設到 {my document}/Fiddler2/Scripts/BrowserPAC.js 就可以了
另一方面因為 fiddler 是一個 proxy, 中間自然可以做一些手腳, 透過 fiddler script 可以做到一些有趣的事情, 可以參考 FiddlerScript CookBook

// Simulate modem uploads 
// Delay sends by 300ms per KB uploaded.
oSession["request-trickle-delay"] = "300";

// Simulate modem downloads
Delay receives by 150ms per KB downloaded.
oSession["response-trickle-delay"] = "150";

// Display in the "Custom Column" the number of milliseconds from the moment of the request until the last byte was received.
oSession["ui-customcolumn"] = oSession["X-TTLB"];

// Display the # of milliseconds until the First Byte was received from the server, followed by the # of ms until the Last Byte.
oSession["ui-customcolumn"] = "FB: " + oSession["X-TTFB"] + "; LB: " + oSession["X-TTLB"];

沒有留言: