Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Created September 13, 2012 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dongyuwei/3711794 to your computer and use it in GitHub Desktop.
Save dongyuwei/3711794 to your computer and use it in GitHub Desktop.
chrome dev tools -> NetWork -> ContextMenu -> Save All as HAR 时保留initiator信息。
_buildRequest: function()
{
var res = {
method: this._request.requestMethod,
url: this._buildRequestURL(this._request.url),
httpVersion: this._request.requestHttpVersion,
headers: this._request.requestHeaders,
queryString: this._buildParameters(this._request.queryParameters || []),
cookies: this._buildCookies(this._request.requestCookies || []),
headersSize: this._request.requestHeadersSize,
bodySize: this.requestBodySize,
initiator: this._request.initiator
};
if (this._request.requestFormData)
res.postData = this._buildPostData();
return res;
}
@dongyuwei
Copy link
Author

编辑 devtools/HAREntry.js 中_buildRequest函数,增加"initiator: this._request.initiator"这一行,Save All as HAR时就会保留initiator信息,方便后续统计分析外链源头。

使用--debug-devtools-frontend时必须同时指定--user-data-dir 目录.必须使用chromium浏览器。

/Users/ilfe/code/chrome4dev/test/chrome-mac/Chromium.app/Contents/MacOS/Chromium --user-data-dir=/Users/ilfe/code/chrome4dev/test/.profile   --debug-devtools-frontend=/Users/ilfe/code/chrome4dev/test/devtools  http://www.lightinthebox.com/

参考:contribute to chrome-developer-tools
使用的chromium和devtools_frontend:
chromium
devtools_frontend

@dongyuwei
Copy link
Author

不指定--user-data-dir= 也可以的。

@dongyuwei
Copy link
Author

HAR with Initiator info(request.initiator):

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "WebInspector",
      "version": "537.1"
    },
    "pages": [
      {
        "startedDateTime": "2012-09-13T05:39:45.015Z",
        "id": "page_1",
        "title": "http://www.lightinthebox.com/",
        "pageTimings": {
          "onContentLoad": 5143,
          "onLoad": 5836
        }
      }
    ],
    "entries": [
      {
        "startedDateTime": "2012-09-13T05:39:45.015Z",
        "time": 1426,
        "request": {
          "method": "GET",
          "url": "http://www.lightinthebox.com/",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Accept-Encoding",
              "value": "gzip,deflate,sdch"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.8"
            },
            {
              "name": "Cookie",
              "value": "sid=mgddp4qv996kaif5ribapau3c1; SRV=A_201208170000; __gads=ID=346f558dff75ea10:T=1347501591:S=ALNI_Mak7L3n6qshv6QmkEflEdc7Lc_Z_g; VelaTestType=velaOldSearchResult; __cust=AAAAAFBRPhWreBaZA5jyAg==; cookie_test=please_accept_for_session; __utma=145114283.1726607412.1347501592.1347501592.1347510246.2; __utmc=145114283; __utmz=145114283.1347501592.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); country_pop=true"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Accept-Charset",
              "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
            },
            {
              "name": "Host",
              "value": "www.lightinthebox.com"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1169.0 Safari/537.1"
            },
            {
              "name": "Accept",
              "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
            }
          ],
          "queryString": [],
          "cookies": [
            {
              "name": "sid",
              "value": "mgddp4qv996kaif5ribapau3c1",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "SRV",
              "value": "A_201208170000",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__gads",
              "value": "ID=346f558dff75ea10:T=1347501591:S=ALNI_Mak7L3n6qshv6QmkEflEdc7Lc_Z_g",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "VelaTestType",
              "value": "velaOldSearchResult",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__cust",
              "value": "AAAAAFBRPhWreBaZA5jyAg==",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "cookie_test",
              "value": "please_accept_for_session",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__utma",
              "value": "145114283.1726607412.1347501592.1347501592.1347510246.2",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__utmc",
              "value": "145114283",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "__utmz",
              "value": "145114283.1347501592.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)",
              "expires": null,
              "httpOnly": false,
              "secure": false
            },
            {
              "name": "country_pop",
              "value": "true",
              "expires": null,
              "httpOnly": false,
              "secure": false
            }
          ],
          "headersSize": 814,
          "bodySize": 0,
          "initiator": {
            "type": "other"
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 05:39:45 GMT"
            },
            {
              "name": "Content-Encoding",
              "value": "gzip"
            },
            {
              "name": "P3P",
              "value": "CP=\"CAO PSA OUR\""
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Content-Length",
              "value": "51785"
            },
            {
              "name": "Pragma",
              "value": "no-cache"
            },
            {
              "name": "Server",
              "value": "Tengine/1.2.3"
            },
            {
              "name": "Vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "Content-Type",
              "value": "text/html; charset=utf-8"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=0, no-cache, no-store"
            },
            {
              "name": "Set-Cookie",
              "value": "cookie_test=please_accept_for_session; expires=Sat, 13-Oct-2012 05:39:45 GMT; path=/; domain=.lightinthebox.com"
            },
            {
              "name": "Expires",
              "value": "Thu, 13 Sep 2012 05:39:45 GMT"
            }
          ],
          "cookies": [
            {
              "name": "cookie_test",
              "value": "please_accept_for_session",
              "path": "/",
              "domain": ".lightinthebox.com",
              "expires": "2012-10-13T05:39:45.000Z",
              "httpOnly": false,
              "secure": false
            }
          ],
          "content": {
            "size": 244514,
            "mimeType": "text/html",
            "compression": 192729
          },
          "redirectURL": "",
          "headersSize": 465,
          "bodySize": 51785
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 214,
          "send": 0,
          "wait": 313,
          "receive": 898,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:45.798Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/style_en_default.css",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 78,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 35
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:00 GMT"
            },
            {
              "name": "Content-Encoding",
              "value": "gzip"
            },
            {
              "name": "Content-Length",
              "value": "25764"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "Content-Type",
              "value": "text/css"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=2592000"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Sat, 13 Oct 2012 02:05:00 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 139787,
            "mimeType": "text/css"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:45.811Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/langs/en/buttons.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 78,
          "bodySize": 0,
          "initiator": {
            "type": "script",
            "stackTrace": [
              {
                "functionName": "",
                "url": "http://www.lightinthebox.com/",
                "lineNumber": 39,
                "columnNumber": 17
              }
            ]
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "162582"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30860493"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 06:26:34 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 162582,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:45.811Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 78,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 41
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Wed, 12 Sep 2012 11:04:50 GMT"
            },
            {
              "name": "Content-Encoding",
              "value": "gzip"
            },
            {
              "name": "X-Content-Type-Options",
              "value": "nosniff"
            },
            {
              "name": "Age",
              "value": "54011"
            },
            {
              "name": "Content-Length",
              "value": "19146"
            },
            {
              "name": "X-XSS-Protection",
              "value": "1; mode=block"
            },
            {
              "name": "Last-Modified",
              "value": "Mon, 02 Apr 2012 18:24:28 GMT"
            },
            {
              "name": "Server",
              "value": "GFE/2.0"
            },
            {
              "name": "Vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "Content-Type",
              "value": "text/javascript; charset=UTF-8"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=31536000"
            },
            {
              "name": "Expires",
              "value": "Thu, 12 Sep 2013 11:04:50 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 55272,
            "mimeType": "text/javascript"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:45.847Z",
        "time": 505,
        "request": {
          "method": "GET",
          "url": "http://partner.googleadservices.com/gampad/google_service.js",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Accept-Encoding",
              "value": "gzip,deflate,sdch"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.8"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Accept-Charset",
              "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
            },
            {
              "name": "Host",
              "value": "partner.googleadservices.com"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1169.0 Safari/537.1"
            },
            {
              "name": "Accept",
              "value": "*/*"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=0"
            },
            {
              "name": "If-None-Match",
              "value": "18422198233708184902"
            },
            {
              "name": "Referer",
              "value": "http://www.lightinthebox.com/"
            }
          ],
          "queryString": [],
          "cookies": [],
          "headersSize": 465,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 42
          }
        },
        "response": {
          "status": 304,
          "statusText": "Not Modified",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 04:43:20 GMT"
            },
            {
              "name": "Age",
              "value": "3386"
            },
            {
              "name": "Server",
              "value": "GFE/2.0"
            },
            {
              "name": "ETag",
              "value": "18422198233708184902"
            },
            {
              "name": "Expires",
              "value": "Thu, 13 Sep 2012 05:43:20 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 3768,
            "mimeType": "text/javascript"
          },
          "redirectURL": "",
          "headersSize": 162,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 9,
          "connect": 224,
          "send": 1,
          "wait": 232,
          "receive": 36,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:45.844Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/jscript_global_en.js?version=2",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [
            {
              "name": "version",
              "value": "2"
            }
          ],
          "cookies": [],
          "headersSize": 88,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 42
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:00 GMT"
            },
            {
              "name": "Content-Encoding",
              "value": "gzip"
            },
            {
              "name": "Content-Length",
              "value": "24814"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "Content-Type",
              "value": "application/x-javascript; charset=utf-8"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=2592000"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Sat, 13 Oct 2012 02:05:00 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 91951,
            "mimeType": "application/x-javascript"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.362Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://www.google-analytics.com/ga.js",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 52,
          "bodySize": 0,
          "initiator": {
            "type": "script",
            "stackTrace": [
              {
                "functionName": "",
                "url": "http://www.lightinthebox.com/",
                "lineNumber": 61,
                "columnNumber": 70
              },
              {
                "functionName": "",
                "url": "http://www.lightinthebox.com/",
                "lineNumber": 62,
                "columnNumber": 5
              }
            ]
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 00:24:19 GMT"
            },
            {
              "name": "Content-Encoding",
              "value": "gzip"
            },
            {
              "name": "X-Content-Type-Options",
              "value": "nosniff, nosniff"
            },
            {
              "name": "Age",
              "value": "6042"
            },
            {
              "name": "Content-Length",
              "value": "14804"
            },
            {
              "name": "Last-Modified",
              "value": "Thu, 16 Aug 2012 07:05:05 GMT"
            },
            {
              "name": "Server",
              "value": "GFE/2.0"
            },
            {
              "name": "Vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "Content-Type",
              "value": "text/javascript"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=43200, public"
            },
            {
              "name": "Expires",
              "value": "Thu, 13 Sep 2012 12:24:19 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 36893,
            "mimeType": "text/javascript"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.363Z",
        "time": 2,
        "request": {
          "method": "GET",
          "url": "http://www.lightinthebox.com/includes/templates/dev_v2/css/images/sprite/logo.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 96,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 72
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "8257"
            },
            {
              "name": "Last-Modified",
              "value": "Thu, 26 Jul 2012 07:54:09 GMT"
            },
            {
              "name": "Server",
              "value": "Tengine/1.2.3"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=2311404"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Tue, 09 Oct 2012 20:08:25 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 8257,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.468Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201208/21.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 66,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 474
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "22591"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666262"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 22591,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.469Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201209/0911nl/50.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 73,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 475
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "3822"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=31390965"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Wed, 11 Sep 2013 09:47:46 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 3822,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.469Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201209/0907nl/50.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 73,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 478
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "3393"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=31039300"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Sat, 07 Sep 2013 08:06:41 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 3393,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.470Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/0731nl/zhuan50.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 78,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 480
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "3682"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666262"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 3682,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.470Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201208/0810nl/zhuanti.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 78,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 482
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "2991"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29704001"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 2991,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.473Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/base-images/pro-attention-bg.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 90,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 510
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "22171"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30860496"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 06:26:37 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 22171,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.474Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/themes/default/images/quote-left-mini.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 99,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 527
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "456"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30860496"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 06:26:37 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 456,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.474Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/themes/default/images/quote-right-mini.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 100,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 527
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "3200"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30860496"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 06:26:37 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 3200,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.475Z",
        "time": 228,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/includes/templates/dev_v2/css/images/flag/be.gif",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Accept-Encoding",
              "value": "gzip,deflate,sdch"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.8"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Accept-Charset",
              "value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
            },
            {
              "name": "Host",
              "value": "cloud.lbox.me"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1169.0 Safari/537.1"
            },
            {
              "name": "Accept",
              "value": "*/*"
            },
            {
              "name": "Referer",
              "value": "http://www.lightinthebox.com/"
            }
          ],
          "queryString": [],
          "cookies": [],
          "headersSize": 411,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 530
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 05:39:46 GMT"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Content-Length",
              "value": "359"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/gif"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29553603"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 359,
            "mimeType": "image/gif",
            "compression": 0
          },
          "redirectURL": "",
          "headersSize": 235,
          "bodySize": 359
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": 0,
          "send": 1,
          "wait": 89,
          "receive": 136,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.476Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/themes/default/images/home-slide-bg.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 97,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 561
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "1234"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30860454"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 06:25:55 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 1234,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.477Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/dfp/201208/LITB_c1180_48829_f1_en.jpg?74",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [
            {
              "name": "74",
              "value": ""
            }
          ],
          "cookies": [],
          "headersSize": 83,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 562
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "49160"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=29830799"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Sat, 24 Aug 2013 08:25:00 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 49160,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.477Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/dfp/201208/LITB_c1180_48829_homer_r_en.jpg?45",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [
            {
              "name": "45",
              "value": ""
            }
          ],
          "cookies": [],
          "headersSize": 88,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 565
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "21113"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=29825716"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Sat, 24 Aug 2013 07:00:17 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 21113,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.478Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201209/49272_1.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 71,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 570
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "13223"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30869586"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 08:58:07 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 13223,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.478Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/resource_83078/dev_v2/themes/default/images/imageHover144.png",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 97,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 571
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "3115"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/png"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30860442"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 06:25:43 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 3115,
            "mimeType": "image/png"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.480Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201209/49272_2.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 71,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 584
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "7567"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=30869858"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            },
            {
              "name": "Expires",
              "value": "Thu, 05 Sep 2013 09:02:39 GMT"
            }
          ],
          "cookies": [],
          "content": {
            "size": 7567,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.480Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/111.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 67,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 597
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:01 GMT"
            },
            {
              "name": "Content-Length",
              "value": "30075"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666262"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 30075,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.482Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/47769_1_en.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 74,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 611
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:02 GMT"
            },
            {
              "name": "Content-Length",
              "value": "8859"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666310"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 8859,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.483Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/47951_s1_en.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 75,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 626
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:02 GMT"
            },
            {
              "name": "Content-Length",
              "value": "5921"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666261"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 5921,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.484Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/47951_s2_en.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 75,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 640
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:02 GMT"
            },
            {
              "name": "Content-Length",
              "value": "5949"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666261"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 5949,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.485Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/47762_s1_en.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 75,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 654
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:02 GMT"
            },
            {
              "name": "Content-Length",
              "value": "8224"
            },
            {
              "name": "Last-Modified",
              "value": "Wed, 22 Aug 2012 10:00:00 GMT"
            },
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "Cache-Control",
              "value": "public, max-age=29666261"
            },
            {
              "name": "Accept-Ranges",
              "value": "bytes"
            }
          ],
          "cookies": [],
          "content": {
            "size": 8224,
            "mimeType": "image/jpeg"
          },
          "redirectURL": "",
          "headersSize": 17,
          "bodySize": 0
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "send": -1,
          "wait": -1,
          "receive": 0,
          "ssl": -1
        },
        "pageref": "page_1"
      },
      {
        "startedDateTime": "2012-09-13T05:39:46.486Z",
        "time": 0,
        "request": {
          "method": "GET",
          "url": "http://cloud.lbox.me/images/wholesale/201207/47762_s4_en.jpg",
          "httpVersion": "HTTP/1.1",
          "headers": [],
          "queryString": [],
          "cookies": [],
          "headersSize": 75,
          "bodySize": 0,
          "initiator": {
            "type": "parser",
            "url": "http://www.lightinthebox.com/",
            "lineNumber": 668
          }
        },
        "response": {
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Date",
              "value": "Thu, 13 Sep 2012 02:05:02 GMT"
            },
            {
              "name": "Content-Length",
              "value": "9440"
            },
            {
              "name": "Last-Modified",

@dongyuwei
Copy link
Author

if (initiator.type === 'script'  &&   initiator.stackTrace.length > 0){
      console.log(initiator.stackTrace[0].url);
}

@dongyuwei
Copy link
Author

var path = require('path');
var fs = require('fs');


function parseInitLinks(harFile,saveToFile){
    saveToFile = saveToFile || path.basename(harFile,'.har') + '.txt';
    var links = JSON.parse(fs.readFileSync(harFile,'utf-8'));

    function filter(url) {
        return ['lbox.me', 'lightinthebox.com/', 'ajax.googleapis.com','data:','twitter.com', 'twimg.com', 'facebook.com','fbcdn'].every(function(p) {
            return url.indexOf(p) === -1;
        });
    }
    var initLinks = [];
    links.log.entries.forEach(function(entry){
        if(filter(entry.request.url)){
            var url;
            if(entry.request.initiator.type === 'parser'){
                url = entry.request.initiator.url;
            }
            if(entry.request.initiator.type === 'script'){
                url = entry.request.initiator.stackTrace[0].url;
            }
            if(url === 'http://www.lightinthebox.com/'){
                console.log(entry.request.url);
                initLinks.push(entry.request.url);
            }
        }
    });
    fs.writeFileSync(saveToFile,JSON.stringify(initLinks,null,3),'utf-8');
}

parseInitLinks('index.har','');

@dongyuwei
Copy link
Author

兰亭首页外链之源(不含社会化widget链接):

[
   "http://partner.googleadservices.com/gampad/google_service.js",
   "http://www.google-analytics.com/ga.js",
   "https://seal.verisign.com/getseal?host_name=www.lightinthebox.com&size=S&use_flash=YES&use_transparent=YES&lang=en",
   "https://www.googleadservices.com/pagead/conversion.js",
   "http://www.googleadservices.com/pagead/conversion.js",
   "https://tracking.searchmarketing.com/welcome.asp?SMCID=62001172&x=",
   "https://tracking.searchmarketing.com/welcome.asp?SMCID=62001190&x=",
   "http://fls.doubleclick.net/activityi;src=3320279;type=nonle718;cat=litbh325;ord=6984294494614.005?",
   "http://rainbow-uk.mythings.com/c.aspx?atok=1939-100-uk",
   "https://seal.verisign.com/getseal?at=1&sealid=2&dn=www.lightinthebox.com&lang=en",
   "https://dsp-service.adsvana.com/um?121.11407122574747&aid=EDMwATM&uuid=&seg=language:en$page_type:index$category_level:$category_id:$product_id:",
   "http://server.iad.liveperson.net/hcp/html/mTag.js?site=2383438",
   "http://dis.us.criteo.com/dis/dis.aspx?p1=v%3D2%26wi%3D7712825%26pt1%3D0%26pt2%3D1&t1=sendEvent&p=2639&c=2&cb=47416458907"
]

@rbraddock
Copy link

Hey - I'm looking for exactly this - a way of extracting the initiators on a given page (or ideally all objects pulled in by a certain initiator)

I wondered if you could let me know how I go about utilising this code? Was it intended as a patch to devtools or can it be reused in the 'snippets' part of Chrome/Canary? Any help gratefully received!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment