/* RequireJS i18n Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. Available via the MIT, GPL or new BSD license. see: http://github.com/jrburke/requirejs for details RequireJS text Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. Available via the MIT, GPL or new BSD license. see: http://github.com/jrburke/requirejs for details */ (function(){function n(h,a){a=a.nlsWaiting;return a[h]||(a[h]=a[a.push({_name:h})-1])}function c(h,a,d,b){var e,l,m,f,k,o,p="root";l=d.split("-");m=[];f=n(h,b);for(e=l.length;e>-1;e--){k=e?l.slice(0,e).join("-"):"root";if(o=a[k]){if(d===b.config.locale&&!f._match)f._match=k;if(p==="root")p=k;f[k]=k;if(o===true){o=h.split("/");o.splice(-1,0,k);o=o.join("/");!b.specified[o]&&!(o in b.loaded)&&!b.defined[o]&&m.push(o)}}}if(p!==d)if(b.defined[p])b.defined[d]=b.defined[p];else f[d]=p;m.length&&b.defined.require(m)} var g=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,j={};require.plugin({prefix:"i18n",require:function(h,a,d,b){var e,l=b.defined[h];e=g.exec(h);if(e[5]){h=e[1]+e[5];a=n(h,b);a[e[4]]=e[4];a=b.nls[h];if(!a){b.defined.require([h]);a=b.nls[h]={}}a[e[4]]=d}else{if(a=b.nls[h])require.mixin(a,l);else a=b.nls[h]=l;b.nlsRootLoaded[h]=true;if(e=b.nlsToLoad[h]){delete b.nlsToLoad[h];for(d=0;d0;d--){v=m.slice(0,d).join("-");v!=="root"&&l[v]&&require.mixin(k,l[v])}l.root&&require.mixin(k,l.root);h.defined[o+"/"+p+"/"+f]=k}h.defined[b]=h.defined[o+"/"+u+"/"+f];if(q)for(p in q)p in j||(h.defined[o+"/"+p+"/"+f]=h.defined[o+"/"+q[p]+"/"+f])}}})})(); (function(){var n=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/]*>\s*([\s\S]+)\s*<\/body>/im;if(!require.textStrip)require.textStrip=function(j){if(j){j=j.replace(c,"");var h=j.match(g);if(h)j=h[1]}else j="";return j};if(!require.getXhr)require.getXhr=function(){var j,h,a;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(h=0;h<3;h++){a=n[h];try{j=new ActiveXObject(a)}catch(d){}if(j){n=[a]; break}}if(!j)throw new Error("require.getXhr(): XMLHttpRequest not available");return j};if(!require.fetchText)require.fetchText=function(j,h){var a=require.getXhr();a.open("GET",j,true);a.onreadystatechange=function(){a.readyState===4&&h(a.responseText)};a.send(null)};require.plugin({prefix:"text",require:function(){},newContext:function(j){require.mixin(j,{text:{},textWaiting:[]})},load:function(j,h){var a=false,d=null,b,e=j.indexOf("."),l=j.substring(0,e),m=j.substring(e+1,j.length),f=require.s.contexts[h], k=f.textWaiting;e=m.indexOf("!");if(e!==-1){a=m.substring(e+1,m.length);m=m.substring(0,e);e=a.indexOf("!");if(e!==-1&&a.substring(0,e)==="strip"){d=a.substring(e+1,a.length);a="strip"}else if(a!=="strip"){d=a;a=null}}b=l+"!"+m;e=a?b+"!"+a:b;if(d!==null&&!f.text[b])f.defined[j]=f.text[b]=d;else if(!f.text[b]&&!f.textWaiting[b]&&!f.textWaiting[e]){k[e]||(k[e]=k[k.push({name:j,key:b,fullKey:e,strip:!!a})-1]);a=require.nameToUrl(l,"."+m,h);f.loaded[j]=false;require.fetchText(a,function(o){f.text[b]= o;f.loaded[j]=true;require.checkLoaded(h)})}},checkDeps:function(){},isWaiting:function(j){return!!j.textWaiting.length},orderDeps:function(j){var h,a,d,b=j.textWaiting;j.textWaiting=[];for(h=0;a=b[h];h++){d=j.text[a.key];j.defined[a.name]=a.strip?require.textStrip(d):d}}})})();require.pause(); require.def("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(n,c,g){with(n){var j=domplate({tag:TABLE({"class":"tabView",cellpadding:0,cellspacing:0,_repObject:"$tabView"},TBODY(TR({"class":"tabViewRow"},TD({"class":"tabViewCol",valign:"top"},TAG("$tabList",{tabView:"$tabView"}))))),tabList:DIV({"class":"tabViewBody",onclick:"$onClickTab"},DIV({"class":"$tabView.id\\Bar tabBar"}),DIV({"class":"$tabView.id\\Bodies tabBodies"})),tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id", _repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(){return false},onClickTab:function(h){h=$.event.fix(h||window.event);this.getTabView(h.target).onClickTab(h)},getTabView:function(h){return c.getAncestorByClass(h,"tabView").repObject}});n=function(h){this.id=h;this.tabs=[];this.listeners=[]};n.prototype={appendTab:function(h){this.tabs.push(h);h.tabView=this;return h},getTab:function(h){return(h=c.getElementByClass(this.element, h+"Tab"))?h.repObject:null},selectTabByName:function(h){(h=c.getElementByClass(this.element,h+"Tab"))&&this.selectTab(h)},addListener:function(h){this.listeners.push(h)},removeListener:function(h){c.remove(this.listeners,h)},onClickTab:function(h){(h=c.getAncestorByClass(h.target,"tab"))&&this.selectTab(h)},selectTab:function(h){if(c.hasClass(h,"tab"))if(!c.hasClass(h,"selected")){var a=h.getAttribute("view");if(a){var d=c.getAncestorByClass(h,"tabViewBody");if(d.selectedTab){d.selectedTab.removeAttribute("selected"); d.selectedBody.removeAttribute("selected");c.removeClass(d.selectedTab,"selected");c.removeClass(d.selectedBody,"selected")}var b=c.getElementByClass(d,"tab"+a+"Body");b||g.error("TabView.selectTab; Missing tab body",h);d.selectedTab=h;d.selectedBody=b;d.selectedTab.setAttribute("selected","true");d.selectedBody.setAttribute("selected","true");c.setClass(d.selectedBody,"selected");c.setClass(d.selectedTab,"selected");this.updateTabBody(d,a)}}},updateTabBody:function(h){h=h.selectedTab.repObject;if(!h._body._updated){h._body._updated= true;h.bodyTag&&h.bodyTag.replace({tab:h},h._body);h&&h.onUpdateBody&&h.onUpdateBody(this,h._body);for(var a=0;a=a.top&&b<=a.top+a.height&&d>=a.left&&d<=a.left+a.width};c.cloneArray=function(a,d){var b=[];if(d)for(var e=0;e2?2:d;d=d<-1?-1:d;if(d==-1)return a+" B";d=Math.pow(10,d);return a==-1||a==undefined?"?":a==0?"0":a<1024?a+" B":a<1048576?Math.round(a/1024*d)/d+" KB":Math.round(a/1048576*d)/d+" MB"};c.formatTime=function(a){return a==-1?"-":a<1E3?a+"ms":a<6E4?Math.ceil(a/10)/100+"s":Math.ceil(a/6E4*100)/100+"m"};c.formatNumber=function(a){a+="";var d=a.split(".");a=d[0];d=d.length>1?"."+d[1]:"";for(var b=/(\d+)(\d{3})/;b.test(a);)a=a.replace(b,"$1,$2");return a+d};c.formatString= function(a){var d=c.cloneArray(arguments);a=d.shift();for(var b=0;b"+a}else{e.name=a.name;e.path=a.path}}else{e.hasOwnProperty("path")||(e.path="data:");e.hasOwnProperty("name")||(e.name=decodeURIComponent(e.encodedContent.substr(0,200)).replace(/\s*$/,""))}return e};c.splitURLTrue=function(a){var d=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/.exec(a);return d?d[2]?{path:d[1],name:d[2]+d[3]}:{path:d[1],name:d[1]}:{name:a,path:a}};c.getURLParameter=function(a){for(var d= window.location.search.substring(1).split("&"),b=0;b25E3&&!d)k=c.$STR("LargeData");e.push({name:b(f),value:b(k)})}else{f=a[l];e.push({name:b(f),value:""})}}catch(o){}e.sort(function(p,u){return p.name<=u.name?-1:1});return e};c.getBody=function(a){if(a.body)return a.body; if(a=a.getElementsByTagName("body")[0])return a;return null};c.getHead=function(a){return a.getElementsByTagName("head")[0]};c.getAncestorByClass=function(a,d){for(a=a;a;a=a.parentNode)if(c.hasClass(a,d))return a;return null};c.$=function(){return c.getElementByClass.apply(this,arguments)};c.getElementByClass=function(a){if(!a)return null;var d=c.cloneArray(arguments);d.splice(0,1);for(var b=a.firstChild;b;b=b.nextSibling){var e=c.cloneArray(d);e.unshift(b);if(c.hasClass.apply(this,e))return b;else if(e= c.getElementByClass.apply(this,e))return e}return null};c.getElementsByClass=function(a){function d(l,m,f){for(l=l.firstChild;l;l=l.nextSibling){var k=c.cloneArray(m);k.unshift(l);c.hasClass.apply(null,k)&&f.push(l);d(l,m,f)}}var b=[],e=c.cloneArray(arguments);e.shift();d(a,e,b);return b};c.getChildByClass=function(a){for(var d=1;d=0){d=d.length;a.className=a.className.substr(0,b-1)+a.className.substr(b+d)}}};c.toggleClass=function(a,d){if(c.hasClass(a, d)){c.removeClass(a,d);return false}else{c.setClass(a,d);return true}};c.trim=function(a){return a.replace(/^\s*|\s*$/g,"")};c.wrapText=function(a,d){var b=/[^A-Za-z_$0-9'"-]/,e=[];a=c.splitLines(a);for(var l=0;l100;){var f=b.exec(m.substr(100,100));f=100+(f?f.index:0);var k=m.substr(0,f);m=m.substr(f);d||e.push("
");e.push(d?k:c.escapeHTML(k));d||e.push("
")}d||e.push("
");e.push(d?m:c.escapeHTML(m));d||e.push("
")}return e.join(d?"\n":"")}; c.insertWrappedText=function(a,d,b){d.innerHTML="
"+c.wrapText(a,b)+"
"};c.splitLines=function(a){var d=/\r\n|\r|\n/;if(a){if(a.split)return a.split(d)}else return[];return(a+"").split(d)};c.getPrettyDomain=function(a){return(a=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(a))?a[2]:""};c.escapeHTML=function(a){function d(b){switch(b){case "<":return"<";case ">":return">";case "&":return"&";case "'":return"'";case '"':return"""}return"?"}return String(a).replace(/[<>&"']/g,d)};c.cropString= function(a,d){a+="";var b=d?d/2:50;return a.length>d?c.escapeNewLines(a.substr(0,b)+"..."+a.substr(a.length-b)):c.escapeNewLines(a)};c.escapeNewLines=function(a){return a.replace(/\r/g,"\\r").replace(/\n/g,"\\n")};c.cloneJSON=function(a){if(a==null||typeof a!="object")return a;try{var d=a.constructor();for(var b in a)d[b]=cloneJSON(a[b]);return d}catch(e){n.exception(a)}return null};c.getOverflowParent=function(a){for(a=a.parentNode;a;a=a.offsetParent)if(a.scrollHeight>a.offsetHeight)return a};c.getElementBox= function(a){var d={};if(a.getBoundingClientRect){a=a.getBoundingClientRect();var b=c.isIE?document.body.clientTop||document.documentElement.clientTop:0,e=c.getWindowScrollPosition();d.top=Math.round(a.top-b+e.top);d.left=Math.round(a.left-b+e.left);d.height=Math.round(a.bottom-a.top);d.width=Math.round(a.right-a.left)}else{b=c.getElementPosition(a);d.top=b.top;d.left=b.left;d.height=a.offsetHeight;d.width=a.offsetWidth}return d};c.getElementPosition=function(a){var d=0,b=0;do{d+=a.offsetLeft;b+=a.offsetTop}while(a= a.offsetParent);return{left:d,top:b}};c.getWindowSize=function(){var a=0,d=0,b;if(typeof window.innerWidth=="number"){a=window.innerWidth;d=window.innerHeight}else if((b=document.documentElement)&&(b.clientHeight||b.clientWidth)){a=b.clientWidth;d=b.clientHeight}else if((b=document.body)&&(b.clientHeight||b.clientWidth)){a=b.clientWidth;d=b.clientHeight}return{width:a,height:d}};c.getWindowScrollSize=function(){var a=0,d=0,b;if(!c.isIEQuiksMode&&(b=document.documentElement)&&(b.scrollHeight||b.scrollWidth)){a= b.scrollWidth;d=b.scrollHeight}if((b=document.body)&&(b.scrollHeight||b.scrollWidth)&&(b.scrollWidth>a||b.scrollHeight>d)){a=b.scrollWidth;d=b.scrollHeight}return{width:a,height:d}};c.getWindowScrollPosition=function(){var a=0,d=0,b;if(typeof window.pageYOffset=="number"){a=window.pageYOffset;d=window.pageXOffset}else if((b=document.body)&&(b.scrollTop||b.scrollLeft)){a=b.scrollTop;d=b.scrollLeft}else if((b=document.documentElement)&&(b.scrollTop||b.scrollLeft)){a=b.scrollTop;d=b.scrollLeft}return{top:a, left:d}};c.addStyleSheet=function(a,d){if(!a.getElementById(d)){var b=a.createElement("link");b.type="text/css";b.rel="stylesheet";b.href=d;b.setAttribute("id",d);c.getHead(a).appendChild(b)}};return c}); require.def("core/cookies",["core/lib"],function(n){return{getCookie:function(c){for(var g=document.cookie.split(";"),j=0;j\r\n
    \r\n
  • Paste HAR\r\nlog into the text box below and\r\npress the Preview button.
  • \r\n
  • Or drop *.har file(s) anywhere on the page (if your browser supports that).
  • \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
Validate data before processing?
\r\n\r\n

\r\n \r\n \r\n \r\n

\r\n
\r\n

HAR Log Examples

\r\n
    \r\n
  • \r\nInline scripts block - Inline scripts block the page load.
  • \r\n
  • \r\nBlocking time - Impact of a limit of max number of parallel connections.
  • \r\n
  • \r\nBrowser cache - Impact of the browser cache on page load (the same page loaded three times).
  • \r\n
  • \r\nSingle page - Single page load (empty cache).
  • \r\n
\r\n
\r\n

This viewer supports HAR 1.2 (see the About tab).

\r\n\r\n',"preview/harModel"], function(n,c,g,j,h,a,d){with(n){n=function(){};n.prototype=g.extend(c.Tab.prototype,{id:"Home",label:a.homeTabLabel,bodyTag:DIV({"class":"homeBody"}),onUpdateBody:function(b,e){e=this.bodyTag.replace({},e);e.innerHTML=d.replace("@HAR_SPEC_URL@",b.harSpecURL,"g");$("#appendPreview").click(g.bindFixed(this.onAppendPreview,this));$(".linkAbout").click(g.bind(this.onAbout,this));b=$("#content");b.bind("dragenter",g.bind(g.cancelEvent,g));b.bind("dragover",g.bind(g.cancelEvent,g));b.bind("drop",g.bind(this.onDrop, this));this.validateNode=$("#validate");if(b=j.getCookie("validate"))this.validateNode.attr("checked",b=="false"?false:true);this.validateNode.change(g.bind(this.onValidationChange,this));$(".example").click(g.bind(this.onLoadExample,this))},onAppendPreview:function(b){b||(b=$("#sourceEditor").val());b&&this.tabView.appendPreview(b)},onAbout:function(){this.tabView.selectTabByName("About")},onValidationChange:function(){var b=this.validateNode.attr("checked");j.setCookie("validate",b)},onLoadExample:function(b){b= $.event.fix(b||window.event).target.getAttribute("path");var e=document.location.href,l=e.indexOf("?");document.location=e.substr(0,l)+"?path="+b;j.setCookie("timeline",true);j.setCookie("stats",true)},onDrop:function(b){var e=$.event.fix(b||window.event);g.cancelEvent(e);try{this.handleDrop(b.originalEvent.dataTransfer)}catch(l){h.exception("HomeTab.onDrop EXCEPTION",l)}},handleDrop:function(b){if(!b)return false;if(b=b.files)for(var e=0;eb.maxItems&&m("There must be a maximum of "+b.maxItems+" in the array")}else b.properties&&a.concat(h(d,b.properties,e,b.additionalProperties));b.pattern&&typeof d=="string"&&!d.match(b.pattern)&&m("does not match the regex pattern "+b.pattern);b.maxLength&&typeof d=="string"&&d.length>b.maxLength&&m("may only be "+b.maxLength+" characters long");b.minLength&&typeof d=="string"&&d.lengthd&&m("must have a minimum value of "+b.minimum);typeof b.maximum!==undefined&&typeof d==typeof b.maximum&&b.maximum=32&&f<127||f==10||f==13)return m.charAt(0);for(m=f.toString(16).toUpperCase();m.length<4;)m="0"+m;return"\\u"+m}).join("");return e}d.prototype= {append:function(e){if(e){if(this.input)if(e.log.pages)for(var l=0;l0?e[0]:null},getPageEntries:function(e){return d.getPageEntries(this.input, e)},getAllEntries:function(){return this.input?this.input.log.entries:[]},getParentPage:function(e){return d.getParentPage(this.input,e)},importPage:function(e,l){var m=this.getUniquePageID(e.id),f=e.id;e.id=m;this.input.log.pages.push(e);for(e=0;e0)return this.loadRemoteArchive(p,k,e,l);if(m=n.getURLParameter("path"))return this.loadLocalArchive(m,e,l)},loadExample:function(e){var l=document.location.href,m=l.indexOf("?");document.location=l.substr(0,m)+"?path="+e;h.setCookie("timeline",true);h.setCookie("stats",true)},loadLocalArchive:function(e,l,m){$.ajax({url:e,context:this, success:function(f){l(f)},error:function(f,k){m(f,k)}});return true},loadRemoteArchive:function(e,l,m,f){if(!e.length)return false;var k=e.shift();l||(l="onInputData");$.ajax({url:k,context:this,dataType:"jsonp",jsonp:"callback",jsonpCallback:l,success:function(o){m(o);if(e.length){var p=this;setTimeout(function(){p.loadRemoteArchive(e,l,m,f)},300)}},error:function(o,p){f(o,p)}});return true}};return d}); require.def("preview/ref",["core/lib"],function(n){return{resolveJson:function(c,g){function j(p,u,v,w,q){var y,t;v=h in p?p[h]:v;if(v!==undefined)v=(a+v).replace(f,"$2$3");q=q||p;if(v!==undefined){if(d)p.__id=v;if(g.schemas&&!(p instanceof Array)&&(t=v.match(/^(.+\/)[^\.\[]*$/)))w=g.schemas[t[1]];if(b[v]&&p instanceof Array==b[v]instanceof Array){q=b[v];delete q.$ref;y=true}else if(t=w&&w.prototype){o.prototype=t;q=new o}b[v]=q;if(e)e[v]=g.time}w=w&&w.properties;var C=p.length;for(var x in p){if(x== C)break;if(p.hasOwnProperty(x)){t=p[x];var H=w&&w[x];if(H&&H.format=="date-time"&&typeof t=="string")t=n.fromISOString(t);else if(typeof t=="object"&&t&&!(t instanceof Date))if(l=t.$ref){delete p[x];var F=l.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(l=F[1]=="$"||F[1]=="this"||F[1]==""?c:b[(a+F[1]).replace(f,"$2$3")])F[3]&&F[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(P,V,M,W,Q){l=l&&l[M?M.replace(/[\"\'\\]/,""):Q]});if(l)t=l;else if(u){t=j(t,false,t.$ref, H);t._loadObject=g.loader}else{var E;E||m.push(q);E=true}}else u||(t=j(t,m==p,v&&k(v,x),H,q!=p&&typeof q[x]=="object"&&q[x]));p[x]=t;if(q!=p&&!q.__isDirty){H=q[x];q[x]=t;y&&t!==H&&!q._loadObject&&!(t instanceof Date&&H instanceof Date&&t.getTime()==H.getTime())&&!(typeof t=="function"&&typeof H=="function"&&t.toString()==H.toString())&&b.onUpdate&&b.onUpdate(q,x,H,t)}}}if(y)for(x in q){if(!q.__isDirty&&q.hasOwnProperty(x)&&!p.hasOwnProperty(x)&&x!="__id"&&x!="__clientId"&&!(q instanceof Array&&isNaN(x))){b.onUpdate&& x!="_loadObject"&&x!="_idAttr"&&b.onUpdate(q,x,q[x],undefined);for(delete q[x];q instanceof Array&&q.length&&q[q.length-1]===undefined;)q.length--}}else b.onLoad&&b.onLoad(q);return q}g=g||{};var h=g.idAttribute||"id",a=g.idPrefix||"",d=g.assignAbsoluteIds,b=g.index||{},e=g.timeStamps,l,m=[],f=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,k=this._addProp,o=function(){};if(c&&typeof c=="object"){c=j(c,false,g.defaultId);j(m,false)}return c},_addProp:function(c,g){return c+(c.match(/#/)?c.length== 1?"":".":"#")+g}}}); require.def("preview/harSchema",[],function(){function n(){}var c=/^(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/,g={pageType:{id:"pageType",description:"Exported web page",optional:true,properties:{startedDateTime:{type:"string",format:"date-time",pattern:c},id:{type:"string",unique:true},title:{type:"string"},pageTimings:{$ref:"pageTimingsType"},comment:{type:"string",optional:true}}}};c={entryType:{id:"entryType",description:"Request and Response related info",optional:true, properties:{pageref:{type:"string",optional:true},startedDateTime:{type:"string",format:"date-time",pattern:c},time:{type:"integer",min:0},request:{$ref:"requestType"},response:{$ref:"responseType"},cache:{$ref:"cacheType"},timings:{$ref:"timingsType"},serverIPAddress:{type:"string",optional:true},connection:{type:"string",optional:true},comment:{type:"string",optional:true}}}};n.prototype={registerType:function(){var h=function(a,d){for(name in d)if(d.hasOwnProperty(name)&&name!="prototype")a[name]= d[name]};for(i=0;i\r\n

HTTP Archive Viewer @VERSION@

\r\nAuthor: Jan Odvarko, odvarko@gmail.com\r\n

\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n

The purpose of this online tool is to visualize\r\n\r\n HTTP Archive (HAR)\r\nlog files (JSON) created by HTTP tracking tools. These files contain log of HTTP\r\nclient/server conversation and can be used for an additional analysis of e.g. \r\npage load performance.

\r\n\r\n

User interface of this tool is composed from the following tabs:

\r\n
    \r\n
  • Home - Paste content of a log file into the text box in this tab.
  • \r\n
  • Preview - Switch to this tab if you want to see visualised HTTP traffic.
  • \r\n
  • HAR - Use this tab to see structure of the input JSON data as an expandable tree.
  • \r\n
  • Schema - Explore format of the input log in this tab.
  • \r\n
\r\n
\r\n

Discussion Group

\r\n

Feedback: \r\n http://groups.google.com/group/http-archive-specification

\r\n

Report issue: \r\n http://code.google.com/p/harviewer/issues/list

\r\n
\r\n

Create Logs using Firebug 1.5

\r\nOne of the tools you can use to log data transfered over HTTP protocol\r\nis Firebug. To do this you have to also install Firebug extension\r\ncalled NetExport.\r\n\r\n

Recommended configurations:

\r\n\r\n
\r\n

HTTP Archive Specification

\r\n

Required\r\n\r\nstructure of the input HTTP Archive file (*.har) is described using\r\nJSON Schema.\r\nYou can explore the current schema definition within the Shema\r\ntab on this page.

\r\n
\r\n

Request Timing Fields

\r\n

Part of the HTTP log is also a timing info about network request executions.\r\nHere is a description of individual request/response phases:

\r\n
    \r\n
  • Blocking - Time spent in a queue waiting for a network connection.
  • \r\n
  • DNS Lookup - DNS resolution time. The time required to resolve a host name.
  • \r\n
  • Connecting - Time required to create TCP connection.
  • \r\n
  • Sending - Time required to send HTTP request to the server.
  • \r\n
  • Waiting - Waiting for a response from the server.
  • \r\n
  • Receiving - Time required to read entire response from the server (or cache).
  • \r\n
\r\n
\r\n

Online Log Files

\r\n

HAR Viewer also support JSONP and so it\'s possible to load log files \r\nfrom differet domains. This allows to link your online logs and preview them\r\nautomaticaly within the viewer. See live\r\nexample.\r\n

\r\n\r\n

1. The Content of a *.har file must be enclosed within a callback function:

\r\nonInputData({ "log": { ... } })\r\n\r\n

2. The link displaying a *.har file (using this viewer) must specify URL of\r\nthe file in inputUrl parameter:

\r\nhttp://www.softwareishard.com/har/viewer/?inputUrl=http://www.example.com/netData.har\r\n\r\n

3. A custom name of the callback function can be specified in a callback parameter\r\n(by default it\'s onInputData):

\r\nhttp://www.softwareishard.com/har/viewer/?inputUrl=http://www.example.com/netData.har&callback=onInputData\r\n

\r\n
\r\n\r\n'], function(d){d=d.replace("@VERSION@",h.version,"g");d=d.replace("@HAR_SPEC_URL@",h.harSpecURL,"g");a.innerHTML=d})}};return n}}); require.def("i18n!nls/previewTab",{root:{previewTabLabel:"Preview",showTimelineButton:"Show Page Timeline",hideTimelineButton:"Hide Page Timeline",showTimelineTooltip:"Show/hide statistic preview for selected pages in the timeline.",showStatsButton:"Show Statistics",hideStatsButton:"Hide Statistics",showStatsTooltip:"Show/hide page timeline.",clearButton:"Clear",clearTooltip:"Remove all HAR logs from the viewer",downloadTooltip:"Download all current data in one HAR file.",downloadError:"Failed to save HAR data"}}); require.def("tabs/previewTab",["domplate/domplate","domplate/tabView","core/lib","i18n!nls/previewTab","domplate/toolbar","tabs/pageTimeline","tabs/pageStats","preview/pageList","core/cookies","downloadify/js/swfobject","downloadify/src/downloadify"],function(n,c,g,j,h,a,d,b,e){with(n){n=function(l){this.model=l;this.toolbar=new h;this.timeline=new a;this.stats=new d(l,this.timeline);l=this.getToolbarButtons();for(var m=0;m0&&this.maxElapsedTime>0)e=Math.round(b/this.maxElapsedTime*100); return Math.max(1,e)},onClick:function(b){var e=$.event.fix(b||window.event);b=e.target;if(c.hasClass(b,"pageBar")){var l=c.isControlClick(e);e=c.isShiftClick(e);var m=c.getAncestorByClass(b,"pageTimelineRow");!l&&!e&&d.unselectAll(m,b);d.toggle(b);this.selectionChanged()}},onMouseMove:function(b){b=$.event.fix(b||window.event).target;if(c.hasClass(b,"pageBar"))if(this.highlightedPage!=b.page){this.highlightedPage=b.page;var e=c.getElementByClass(this.element,"pageDescContainer");a.Desc.render(e, b)}},getPages:function(b){return b.log.pages?b.log.pages:[]},getPageBar:function(b){if(this.element)for(var e=c.getElementByClass(this.element,"pageTimelineTable").firstChild.firstChild.firstChild;e;){if(e.firstChild.page==b)return e.firstChild;e=e.nextSibling}},recalcLayout:function(){for(var b=this.maxElapsedTime=0,e=c.getElementsByClass(this.element,"pageBar"),l=0;l0&&this.maxElapsedTime0)e+=j.pageLoad+": "+c.formatTime(l)+", ";b=h.getPageEntries(b.input,b.page).length;e+=b+" "+(b==1?j.request:j.requests);return e},getTime:function(b){b=c.parseISO8601(b.startedDateTime);return(new Date(b)).toLocaleString()}, getTitle:function(b){return b.title},getComment:function(b){return b.comment?b.comment:""},render:function(b,e){b=this.tag.replace({object:{input:e.input,page:e.page}},b);c.$(b,"connector").style.marginLeft=e.parentNode.offsetLeft+"px";return b}});var d={isSelected:function(b){return c.hasClass(b,"selected")},toggle:function(b){c.toggleClass(b,"selected")},select:function(b){this.isSelected(b)||c.setClass(b,"selected")},unselect:function(b){this.isSelected(b)&&c.removeClass(b,"selected")},getSelection:function(b){var e= [];b=c.getElementsByClass(b,"pageBar");for(var l=0;l0)e.data[2].value-=x.timings.ssl;var H=x.response,F=H.bodySize>0?H.bodySize:0,E=H.content.mimeType;E=(E=E?E.match(/^([^;]+)/)[1]:null)?E:H.content.mimeType;if(o[E]){l.data[0].value+=F;l.data[0].count++}else if(k[E]){l.data[1].value+=F;l.data[1].count++}else if(p[E]){l.data[2].value+=F;l.data[2].count++}else if(u[E]){l.data[3].value+= F;l.data[3].count++}else if(v[E]){l.data[4].value+=F;l.data[4].count++}else{l.data[5].value+=F;l.data[5].count++}m.data[0].value+=x.request.headersSize>0?x.request.headersSize:0;m.data[1].value+=x.request.bodySize>0?x.request.bodySize:0;m.data[2].value+=x.response.headersSize>0?x.response.headersSize:0;m.data[3].value+=F;if(x.response.status==206){f.data[1].value+=F;f.data[1].count++}else if(x.response.status==304){f.data[2].value+=F;f.data[2].count++}else if(F>0){f.data[0].value+=F;f.data[0].count++}}}b.draw(c.$(this.timingPie, "pieGraph"),e);b.draw(c.$(this.contentPie,"pieGraph"),l);b.draw(c.$(this.trafficPie,"pieGraph"),m);b.draw(c.$(this.cachePie,"pieGraph"),f)}},cleanUp:function(){e.cleanUp();l.cleanUp();m.cleanUp();f.cleanUp()},showInfoTip:function(q,y,t,C){return b.showInfoTip(q,y,t,C)},onSelectionChange:function(q){this.update(q)},show:function(q){if(!this.isVisible()){d.addListener(this);c.setClass(this.element,"opened");if(!q||$.browser.msie)this.element.style.display="block";else $(this.element).slideDown();this.update(this.timeline.getSelection())}}, hide:function(q){if(this.isVisible()){d.removeListener(this);c.removeClass(this.element,"opened");if(!q||$.browser.msie)this.element.style.display="none";else $(this.element).slideUp()}},isVisible:function(){return c.hasClass(this.element,"opened")},toggle:function(q){this.isVisible()?this.hide(q):this.show(q)},render:function(q){this.element=this.tag.replace({},q);this.timingPie=b.render(e,this.element);this.contentPie=b.render(l,this.element);this.trafficPie=b.render(m,this.element);this.cachePie= b.render(f,this.element);this.cachePie.style.borderRight=0;return this.element}});b=domplate({tag:TABLE({"class":"pagePieTable",cellpadding:0,cellspacing:0,_repObject:"$pie"},TBODY(TR(TD({"class":"pieBox",title:"$pie.title"}),TD(FOR("item","$pie.data",DIV({"class":"pieLabel",_repObject:"$item"},SPAN({"class":"box",style:"background-color: $item.color"}," "),SPAN({"class":"label"},"$item.label"))))))),render:function(q,y){q=this.tag.append({pie:q},y);y=c.$(q,"pieBox");var t=document.createElement("canvas"); t.setAttribute("class","pieGraph ");t.setAttribute("height","100");t.setAttribute("width","100");y.appendChild(t);typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager.initElement(t);return q},draw:function(q,y){if(q&&q.getContext){var t=q.getContext("2d"),C=Math.min(q.width,q.height)/2,x=[q.width/2,q.height/2];t.clearRect(0,0,q.width,q.height);q=0;y=y.data;var H=0;for(var F in y)H+=y[F].value;if(H)for(F=0;Fj-this.infoTipWindowPadding){g.style.left="auto";g.style.right=j-h+this.infoTipMargin+"px"}else{g.style.left=h+this.infoTipMargin+"px";g.style.right="auto"}g.style.top=a+g.offsetHeight+this.infoTipMargin>d?Math.max(0,d-(g.offsetHeight+ this.infoTipMargin))+"px":a+this.infoTipMargin+"px";g.style.bottom="auto";g.setAttribute("active","true")}else this.hideInfoTip(g)},hideInfoTip:function(g){g&&g.removeAttribute("active")},onMouseOut:function(g){g.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(g){this.infoTip.setAttribute("multiline",false);this.showInfoTip(this.infoTip,g.target,g.clientX,g.clientY,g.rangeParent,g.rangeOffset)},populateTimingInfoTip:function(g,j){this.tags.colorTag.replace({rgbValue:j},g);return true}, addListener:function(g){this.listeners.push(g)},removeListener:function(g){c.remove(this.listeners,g)}});n.initialize();return n}}); require.def("i18n!nls/requestList",{root:{fromCache:"From Cache",menuBreakLayout:"Break Timeline Layout",menuOpenRequestInWindow:"Open Request in New Window",menuOpenResponseInWindow:"Open Response in New Window",request:"Request",requests:"Requests",tooltipSize:"%S (%S bytes)",tooltipZippedSize:"%S (%S bytes) - compressed",tooltipUnzippedSize:"%S (%S bytes) - uncompressed","request.Started":"Started","request.phase.Resolving":"DNS Lookup","request.phase.Connecting":"Connecting","request.phase.Blocking":"Blocking", "request.phase.Sending":"Sending","request.phase.Waiting":"Waiting","request.phase.Receiving":"Receiving",ContentLoad:"DOM Loaded",WindowLoad:"Page Loaded","page.event.Load":"Page Loaded",menuBreakTimeline:"Break Timeline Layout",menuOpenRequest:"Open Request in New Window",menuOpenResponse:"Open Response in New Window"}}); require.def("preview/requestList",["domplate/domplate","core/lib","i18n!nls/requestList","preview/harModel","core/cookies","preview/requestBody","domplate/infoTip","domplate/popupMenu"],function(n,c,g,j,h,a,d,b){with(n){n=function(f){this.input=f;d.addListener(this)};n.prototype=domplate({tableTag:TABLE({"class":"netTable",cellpadding:0,cellspacing:0,onclick:"$onClick"},TBODY(TR(TD({width:"20%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"10%"}),TD({width:"50%"}),TD({width:"15px"})))),fileTag:FOR("file", "$files",TR({"class":"netRow loaded",$hasHeaders:"$file|hasResponseHeaders",$responseError:"$file|isError",$fromCache:"$file|isFromCache"},TD({"class":"netHrefCol netCol"},DIV({"class":"netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getHref"),DIV({"class":"netFullHrefLabel netHrefLabel netLabel",style:"margin-left: $file|getIndent\\px"},"$file|getFullHref")),TD({"class":"netStatusCol netCol"},DIV({"class":"netStatusLabel netLabel"},"$file|getStatus")),TD({"class":"netDomainCol netCol"}, DIV({"class":"netDomainLabel netLabel"},"$file|getDomain")),TD({"class":"netSizeCol netCol"},DIV({"class":"netSizeLabel netLabel"},"$file|getSize")),TD({"class":"netTimeCol netCol"},DIV({"class":"netTimelineBar"}," ",DIV({"class":"netResolvingBar netBar",style:"left: $file.offset"}),DIV({"class":"netConnectingBar netBar",style:"left: $file.offset"}),DIV({"class":"netBlockingBar netBar",style:"left: $file.offset"}),DIV({"class":"netSendingBar netBar",style:"left: $file.offset"}),DIV({"class":"netWaitingBar netBar", style:"left: $file.offset"}),DIV({"class":"netContentLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netWindowLoadBar netBar",style:"left: $file.offset"}),DIV({"class":"netReceivingBar netBar",style:"left: $file.offset; width: $file.width"},SPAN({"class":"netTimeLabel"},"$file|getElapsedTime")))),TD({"class":"netOptionsCol netCol"},DIV({"class":"netOptionsLabel netLabel",onclick:"$onOpenOptions"})))),headTag:TR({"class":"netHeadRow"},TD({"class":"netHeadCol",colspan:6},DIV({"class":"netHeadLabel"}, "$doc.rootFile.href"))),netInfoTag:TR({"class":"netInfoRow"},TD({"class":"netInfoCol",colspan:6})),summaryTag:TR({"class":"netRow netSummaryRow"},TD({"class":"netCol",colspan:3},DIV({"class":"netCountLabel netSummaryLabel"},"-")),TD({"class":"netTotalSizeCol netCol"},DIV({"class":"netTotalSizeLabel netSummaryLabel"},"0KB")),TD({"class":"netTotalTimeCol netCol"},DIV({"class":"",style:"width: 100%"},DIV({"class":"netCacheSizeLabel netSummaryLabel"},"(",SPAN("0KB"),SPAN(" "+g.fromCache),")"),DIV({"class":"netTimeBar"}, SPAN({"class":"netTotalTimeLabel netSummaryLabel"},"0ms")))),TD({"class":"netCol"})),getIndent:function(){return 0},isError:function(f){f=Math.floor(f.response.status/100);return f==4||f==5},isFromCache:function(f){return f.cache&&f.cache.afterRequest},getHref:function(f){return f.request.method+" "+c.getFileName(this.getFullHref(f))},getFullHref:function(f){return f.request.url},getStatus:function(f){return(f.response.status>0?f.response.status+" ":"")+f.response.statusText},getDomain:function(f){return c.getPrettyDomain(f.request.url)}, getSize:function(f){var k=f.response.bodySize;return this.formatSize(k&&k!=-1?k:f.response.content.size)},hasResponseHeaders:function(){return true},formatSize:function(f){return c.formatSize(f)},getElapsedTime:function(f){return c.formatTime(f.time)},onClick:function(f){var k=$.event.fix(f||window.event);if(c.isLeftClick(f))if(k=c.getAncestorByClass(k.target,"netRow")){this.toggleHeadersRow(k);c.cancelEvent(f)}},toggleHeadersRow:function(f){if(c.hasClass(f,"hasHeaders")){var k=f.repObject;c.toggleClass(f, "opened");if(c.hasClass(f,"opened")){var o=this.netInfoTag.insertRows({},f)[0];o.repObject=k;(new a).render(o.firstChild,k)}else{o=f.nextSibling;c.getElementByClass(o,"netInfoBody");f.parentNode.removeChild(o)}}},onOpenOptions:function(f){var k=$.event.fix(f||window.event);c.cancelEvent(f);if(c.isLeftClick(f)){f=k.target;k=this.getOptionsMenuItems(c.getAncestorByClass(f,"netRow"));(new b({id:"requestContextMenu",items:k})).showPopup(f)}},getOptionsMenuItems:function(f){var k=f.repObject;return[{label:g.menuBreakTimeline, type:"checkbox",disabled:false,checked:f.phase.files[0]==k,command:c.bind(this.breakLayout,this,f)},"-",{label:g.menuOpenRequest,command:c.bind(this.openRequest,this,k)},{label:g.menuOpenResponse,disabled:!k.response.content.text,command:c.bind(this.openResponse,this,k)}]},openRequest:function(f,k){window.open(k.request.url)},openResponse:function(f,k){f=k.response.content.mimeType;var o=k.response.content.encoding;window.open("data:"+(f?f:"")+";"+(o?o:"")+","+k.response.content.text)},breakLayout:function(f, k){f=k.repObject;k.breakLayout=k.phase.files[0]!=f;k=c.getAncestorByClass(k,"netTable");f=j.getParentPage(this.input,f);this.updateLayout(k,f)},updateLayout:function(f,k){var o=j.getPageEntries(this.input,k);this.table=f;f=this.firstRow=this.table.firstChild.firstChild.nextSibling;this.phases=[];var p=h.getCookie("phaseInterval");p||(p=1E3);var u=null,v=k?c.parseISO8601(k.startedDateTime):null,w=0,q=0;if(k&&k.pageTimings){q=k.pageTimings;w=q.onLoad>0?q.onLoad:0;q=q.onContentLoad>0?q.onContentLoad: 0}for(var y=0;y=p&&C>v+w;if(typeof f.breakLayout=="boolean")if(!u||f.breakLayout)u=this.startPhase(t);else u.addFile(t);else if(!u||x)u=this.startPhase(t);else u.addFile(t);if(u.startTime==undefined||u.startTime>C)u.startTime=C;if(u.endTime==undefined||u.endTime0)this.contentLoadBarOffset=((p+u-o.startTime)/this.phaseElapsed*100).toFixed(3);f=f.pageTimings.onLoad;if(k.phase==this.phases[0]&&f>0)this.windowLoadBarOffset=((p+f-o.startTime)/this.phaseElapsed*100).toFixed(3)}return o},updateTimeline:function(f){for(var k,o=this.firstRow;o;o=o.nextSibling){var p= o.repObject;if(p)if(!c.hasClass(o,"netInfoRow")){k=this.calculateFileTimes(f,p,k);o.phase=p.phase;delete p.phase;p=c.getElementByClass(o,"netResolvingBar");var u=p.nextSibling,v=u.nextSibling,w=v.nextSibling,q=w.nextSibling,y=q.nextSibling,t=y.nextSibling,C=t.nextSibling;p.style.left=u.style.left=v.style.left=w.style.left=q.style.left=C.style.left=this.barOffset+"%";p.style.width=this.barResolvingWidth+"%";u.style.width=this.barConnectingWidth+"%";v.style.width=this.barBlockingWidth+"%";w.style.width= this.barSendingWidth+"%";q.style.width=this.barWaitingWidth+"%";C.style.width=this.barReceivingWidth+"%";if(this.contentLoadBarOffset){y.style.left=this.contentLoadBarOffset+"%";y.style.display="block";this.contentLoadBarOffset=null}if(this.windowLoadBarOffset){t.style.left=this.windowLoadBarOffset+"%";t.style.display="block";this.windowLoadBarOffset=null}}}},updateSummaries:function(f){for(var k=this.phases,o=0,p=0,u=0,v=0,w=0;w 0)v+=" (onload: "+c.formatTime(f.pageTimings.onLoad)+")";u.innerHTML=v}},formatRequestCount:function(f){return f+" "+(f==1?g.request:g.requests)},summarizePhase:function(f){var k=0,o=0,p="all";if(p=="all")p=null;for(var u=0,v=0,w=0,q=0;qw)w=y}}return{cachedSize:k,totalSize:o, totalTime:w-v,fileCount:u}},showInfoTip:function(f,k){var o=c.getAncestorByClass(k,"netRow");if(o)if(c.getAncestorByClass(k,"netBar")){f.setAttribute("multiline",true);this.infoTipURL=k=o.repObject.startedDateTime+"-nettime";return this.populateTimeInfoTip(f,o)}else if(c.hasClass(k,"netSizeLabel")){this.infoTipURL=k=o.repObject.startedDateTime+"-netsize";return this.populateSizeInfoTip(f,o)}},populateTimeInfoTip:function(f,k){l.render(this.input,k,f);return true},populateSizeInfoTip:function(f,k){m.render(this.input, k,f);return true},render:function(f,k){var o=j.getPageEntries(this.input,k);if(o.length){this.table=this.tableTag.replace({},f,this);this.summaryRow=this.summaryTag.insertRows({},this.table.firstChild)[0];this.fileTag.insertRows({files:o},this.table.firstChild.lastChild.previousSibling,this);this.updateLayout(this.table,k)}}});var e=function(f){this.files=[];this.addFile(f)};e.prototype={addFile:function(f){this.files.push(f);f.phase=this},getLastStartTime:function(){return this.files[this.files.length- 1].startedDateTime}};var l=domplate({tableTag:TABLE({"class":"timeInfoTip"},TBODY()),timingsTag:FOR("time","$timings",TR({"class":"timeInfoTipRow",$collapsed:"$time|hideBar"},TD({"class":"$time|getBarClass timeInfoTipBar",$loaded:"$time.loaded",$fromCache:"$time.fromCache"}),TD({"class":"timeInfoTipCell startTime"},"$time.start|formatStartTime"),TD({"class":"timeInfoTipCell elapsedTime"},"$time.elapsed|formatTime"),TD("$time|getLabel"))),startTimeTag:TR(TD(),TD("$startTime.time|formatStartTime"), TD({colspan:2},"$startTime|getLabel")),separatorTag:TR(TD({colspan:4,height:"10px"})),eventsTag:FOR("event","$events",TR({"class":"timeInfoTipEventRow"},TD({"class":"timeInfoTipBar",align:"center"},DIV({"class":"$event|getBarClass timeInfoTipEventBar"})),TD("$event.start|formatStartTime"),TD({colspan:2},"$event|getLabel"))),hideBar:function(f){return!f.elapsed&&f.bar=="request.phase.Blocking"},getBarClass:function(f){return"net"+f.bar.substr(f.bar.lastIndexOf(".")+1)+"Bar"},formatTime:function(f){return c.formatTime(f)}, formatStartTime:function(f){var k=f>0,o=c.formatTime(Math.abs(f));if(!f)return o;return(k>0?"+":"-")+o},getLabel:function(f){return g[f.bar]},render:function(f,k,o){var p=k.repObject;var u=(f=j.getParentPage(f,p))?c.parseISO8601(f.startedDateTime):null,v=c.parseISO8601(p.startedDateTime);o=l.tableTag.replace({},o);var w={};w.time=v-k.phase.startTime;w.bar="request.Started";this.startTimeTag.insertRows({startTime:w},o.firstChild);this.separatorTag.insertRows({},o.firstChild);k=0;w=[];var q=p.timings.dns, y=p.timings.connect,t=p.timings.blocked,C=p.timings.send,x=p.timings.wait,H=p.timings.receive;q>=0&&w.push({bar:"request.phase.Resolving",elapsed:q,start:k});if(y>=0)w.push({bar:"request.phase.Connecting",elapsed:y,start:k+=q<0?0:q});if(t>=0)w.push({bar:"request.phase.Blocking",elapsed:t,start:k+=y<0?0:y});if(C>=0)w.push({bar:"request.phase.Sending",elapsed:C,start:k+=t<0?0:t});if(x>=0)w.push({bar:"request.phase.Waiting",elapsed:x,start:k+=C<0?0:C});if(H>=0)w.push({bar:"request.phase.Receiving",elapsed:H, start:k+(x<0?0:x),loaded:p.loaded,fromCache:p.fromCache});this.timingsTag.insertRows({timings:w},o.firstChild);p=[];f&&f.pageTimings.onContentLoad>0&&p.push({bar:"ContentLoad",start:u+f.pageTimings.onContentLoad-v});f&&f.pageTimings.onLoad>0&&p.push({bar:"WindowLoad",start:u+f.pageTimings.onLoad-v});if(p.length){this.separatorTag.insertRows({},o.firstChild);this.eventsTag.insertRows({events:p},o.firstChild);return true}}}),m=domplate({tag:DIV({"class":"sizeInfoTip"},"$file|getSize"),zippedTag:DIV(DIV({"class":"sizeInfoTip"}, "$file|getBodySize"),DIV({"class":"sizeInfoTip"},"$file|getContentSize")),getSize:function(f){f=f.response.bodySize;return c.formatString(g.tooltipSize,[c.formatSize(f),f.size<0?"?":c.formatNumber(f)])},getBodySize:function(f){f=f.response.bodySize;return c.formatString(g.tooltipZippedSize,[c.formatSize(f),f.size<0?"?":c.formatNumber(f)])},getContentSize:function(f){f=f.response.content.size;return c.formatString(g.tooltipUnzippedSize,[c.formatSize(f),f.size<0?"?":c.formatNumber(f)])},render:function(f, k,o){f=k.repObject;if(f.response.bodySize==f.response.content.size)return this.tag.replace({file:f},o);return this.zippedTag.replace({file:f},o)}});return n}}); require.def("preview/pageList",["domplate/domplate","core/lib","core/trace","preview/requestList"],function(n,c,g,j){with(n){n=function(h){this.input=h};n.prototype=domplate({tableTag:TABLE({"class":"pageTable",cellpadding:0,cellspacing:0,onclick:"$onClick",_repObject:"$input"},TBODY(TAG("$rowTag",{groups:"$input.log.pages"}))),rowTag:FOR("group","$groups",TR({"class":"pageRow",_repObject:"$group"},TD({"class":"groupName pageCol"},SPAN({"class":"pageName"},"$group|getPageTitle")))),bodyTag:TR({"class":"pageInfoRow", style:"height:auto;"},TD({"class":"pageInfoCol"})),getPageTitle:function(h){return c.cropString(h.title,100)},getPageID:function(h){return"["+h.id+"]"},onClick:function(h){var a=$.event.fix(h||window.event);if(c.isLeftClick(h))if(a=c.getAncestorByClass(a.target,"pageRow")){this.toggleRow(a);c.cancelEvent(h)}},toggleRow:function(h,a){if(!(c.hasClass(h,"opened")&&a)){c.toggleClass(h,"opened");if(c.hasClass(h,"opened")){a=this.bodyTag.insertRows({},h)[0];(new j(this.input)).render(a.firstChild,h.repObject)}else{a= h.nextSibling;h.parentNode.removeChild(a)}}},expandAll:function(h){for(h=h.firstChild.firstChild;h;){hasClass(h,"pageRow")&&this.toggleRow(h,true);h=h.nextSibling}},getPageRow:function(h){for(var a=c.getElementsByClass(this.element.parentNode,"pageRow"),d=0;d0&&o.appendTab(new d(k));this.showCache(k)&&o.appendTab(new l(k));this.showHtml(k)&& o.appendTab(new m(k));f=o.render(f);o.selectTabByName("Headers");return f},showCache:function(f){if(!f.cache)return false;if(!f.cache.afterRequest)return false;if(f.category=="image")return false;return true},showHtml:function(f){return f.response.content.mimeType=="text/html"||f.mimeType=="application/xhtml+xml"}});var a=function(f){this.file=f};a.prototype=domplate(j.Tab.prototype,{id:"Headers",label:c.Headers,bodyTag:TABLE({"class":"netInfoHeadersText netInfoText netInfoHeadersTable",cellpadding:0, cellspacing:0},TBODY(TR({"class":"netInfoResponseHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},c.ResponseHeaders))),TR({"class":"netInfoRequestHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},c.RequestHeaders))))),headerDataTag:FOR("param","$headers",TR(TD({"class":"netInfoParamName"},"$param.name"),TD({"class":"netInfoParamValue"},PRE("$param|getParamValue")))),getParamValue:function(f){return g.wrapText(f.value,true)},onUpdateBody:function(f,k){this.file.response.headers&& this.insertHeaderRows(k,this.file.response.headers,"Headers","ResponseHeaders");this.file.request.headers&&this.insertHeaderRows(k,this.file.request.headers,"Headers","RequestHeaders")},insertHeaderRows:function(f,k,o,p){o=g.getElementByClass(f,"netInfo"+o+"Table");p=g.getElementByClass(o,"netInfo"+p+"Title");if(k.length){this.headerDataTag.insertRows({headers:k},p?p:f);g.removeClass(p,"collapsed")}else g.setClass(p,"collapsed")}});var d=function(f){this.file=f};d.prototype=domplate(j.Tab.prototype, {id:"Response",label:c.Response,bodyTag:DIV({"class":"netInfoResponseText netInfoText"},PRE({"class":"javascript:nocontrols:nogutter:",name:"code"})),onUpdateBody:function(f,k){f=g.getElementByClass(k,"netInfoResponseText");if(this.file.category=="image"){g.clearNode(f);k=k.ownerDocument.createElement("img");k.src=this.file.href;f.appendChild(k,f)}else{g.clearNode(f.firstChild);k=this.file.response.content.text;var o=this.file.response.content.mimeType;if(o=="application/javascript"||o=="text/javascript"|| o=="application/x-javascript"||o=="text/ecmascript"||o=="application/ecmascript"){f.firstChild.innerHTML=k;h.SyntaxHighlighter.HighlightAll(f.firstChild)}else g.insertWrappedText(k,f.firstChild)}}});var b=function(f){this.file=f};b.prototype=domplate(a.prototype,{id:"Params",label:c.URLParameters,bodyTag:TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",cellpadding:0,cellspacing:0},TBODY()),onUpdateBody:function(f,k){this.file.request.queryString&&this.insertHeaderRows(g.getElementByClass(k, "netInfoParamsText"),this.file.request.queryString,"Params")}});var e=function(f,k){k=k.charAt(0).toUpperCase()+k.slice(1).toLowerCase();this.file=f;this.id=k;this.label=c[k]};e.prototype=domplate(a.prototype,{bodyTag:DIV({"class":"netInfo$tab.id\\Text netInfoText"},TABLE({"class":"netInfo$tab.id\\Table",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(f,k){if(f=this.file.request.postData){k=g.getElementByClass(k,"netInfo"+this.id+"Text");f.mimeType=="application/x-www-form-urlencoded"? this.insertHeaderRows(k,f.params,this.id):g.insertWrappedText(f.text,k)}}});(function(f){this.file=f}).prototype=domplate(a.prototype,{id:"Cookies",label:c.Cookies,bodyTag:DIV({"class":"netInfoCookiesText netInfoText"},TABLE({"class":"netInfoCookiesTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},c.ResponseCookies))),TR({"class":"netInfoRequestCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},c.RequestCookies)))))), onUpdateBody:function(f,k){if(file.response.cookies){f=g.getElementByClass(k,"netInfoParamsText");this.insertHeaderRows(f,file.response.cookies,"Cookies","ResponseCookies")}if(file.request.cookies){f=g.getElementByClass(k,"netInfoParamsText");this.insertHeaderRows(f,file.request.cookies,"Cookies","RequestCookies")}}});var l=function(f){this.file=f};l.prototype=domplate(a.prototype,{id:"Cache",label:c.Cache,bodyTag:DIV({"class":"netInfoCacheText netInfoText"},TABLE({"class":"netInfoCacheTable",cellpadding:0, cellspacing:0},TBODY())),onUpdateBody:function(f,k){if(this.file.cache&&this.file.cache.afterRequest){f=this.file.cache.afterRequest;var o=[];for(var p in f)o.push({name:p,value:f[p]});this.insertHeaderRows(k,o,"Cache")}}});var m=function(f){this.file=f};m.prototype=domplate(a.prototype,{id:"HTML",label:c.HTML,bodyTag:DIV({"class":"netInfoHtmlText netInfoText"},IFRAME({"class":"netInfoHtmlPreview"})),onUpdateBody:function(f,k){g.getElementByClass(k,"netInfoHtmlPreview").contentWindow.document.body.innerHTML= this.file.response.content.text}});return n}}); require.def("syntax-highlighter/shCore",[],function(){var n={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:'About...

dp.SyntaxHighlighter

Version: {V}

http://www.dreamprojections.com/syntaxhighlighter

©2004-2007 Alex Gorbatchev.
'},ClipboardSwf:null, Version:"1.5.1"}};n.SyntaxHighlighter=n.sh;n.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(c){return c.collapse},func:function(c,g){c.parentNode.removeChild(c);g.div.className=g.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function(c,g){c=n.sh.Utils.FixForBlogger(g.originalCode).replace(/'+ c+"");g.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||n.sh.ClipboardSwf!=null},func:function(c,g){c=n.sh.Utils.FixForBlogger(g.originalCode).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");if(window.clipboardData)window.clipboardData.setData("text",c);else if(n.sh.ClipboardSwf!=null){var j=g.flashCopier;if(j==null){j=document.createElement("div");g.flashCopier=j;g.div.appendChild(j)}j.innerHTML=''}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function(c,g){c=document.createElement("IFRAME");var j=null;c.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(c);j=c.contentWindow.document;n.sh.Utils.CopyStyles(j,window.document);j.write('
'+g.div.innerHTML+"
");j.close();c.contentWindow.focus();c.contentWindow.print();alert("Printing...");document.body.removeChild(c)}},About:{label:"?",func:function(){var c=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),g=c.document;n.sh.Utils.CopyStyles(g,window.document);g.write(n.sh.Strings.AboutDialog.replace("{V}",n.sh.Version));g.close();c.focus()}}};n.sh.Toolbar.Create=function(c){var g=document.createElement("DIV");g.className="tools";for(var j in n.sh.Toolbar.Commands){var h= n.sh.Toolbar.Commands[j];h.check!=null&&!h.check(c)||(g.innerHTML+='"+h.label+"")}return g};n.sh.Toolbar.Command=function(c,g){for(var j=g;j!=null&&j.className.indexOf("dp-highlighter")==-1;)j=j.parentNode;j!=null&&n.sh.Toolbar.Commands[c].func(g,j.highlighter)};n.sh.Utils.CopyStyles=function(c,g){g=g.getElementsByTagName("link");for(var j=0;j')};n.sh.Utils.FixForBlogger=function(c){return n.sh.isBloggerMode==true?c.replace(/|<br\s*\/?>/gi,"\n"):c};n.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")};n.sh.Match=function(c,g,j){this.value=c;this.index=g;this.length= c.length;this.css=j};n.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};n.sh.Highlighter.SortCallback=function(c,g){if(c.indexg.index)return 1;else if(c.lengthg.length)return 1;return 0};n.sh.Highlighter.prototype.CreateElement=function(c){c=document.createElement(c);c.highlighter=this;return c};n.sh.Highlighter.prototype.GetMatches= function(c,g){for(var j=null;(j=c.exec(this.code))!=null;)this.matches[this.matches.length]=new n.sh.Match(j[0],j.index,g)};n.sh.Highlighter.prototype.AddBit=function(c,g){if(!(c==null||c.length==0)){var j=this.CreateElement("SPAN");c=c.replace(/ /g," ");c=c.replace(/");if(g!=null)if(/br/gi.test(c)){c=c.split(" 
");for(var h=0;hj.index&&c.index/gi,"\n").split("\n");this.addControls==true&&this.bar.appendChild(n.sh.Toolbar.Create(this));if(this.showColumns){for(var g= this.CreateElement("div"),j=this.CreateElement("div"),h=1;h<=150;)if(h%10==0){g.innerHTML+=h;h+=(h+"").length}else{g.innerHTML+="·";h++}j.className="columns";j.appendChild(g);this.bar.appendChild(j)}h=0;for(g=this.firstLine;h0;f++)if(g(e[f]).length!=0){var k=l.exec(e[f]);if(k!=null&&k.length>0)m=Math.min(k[0].length,m)}if(m>0)for(f=0;f0){var B=o(z);if(B){M[s].width=B.getAttribute("width")?B.getAttribute("width"):"0";M[s].height=B.getAttribute("height")?B.getAttribute("height"):"0";if(v(M[s].swfVersion)){D.webkit&&D.webkit<312&&a(B);q(z,true)}else M[s].expressInstall&&!R&&v("6.0.65")&&(D.win||D.mac)?d(M[s]): b(B)}}else q(z,true)}}function a(r){var s=r.getElementsByTagName(C)[0];if(s){var z=p("embed"),B=s.attributes;if(B)for(var G=B.length,J=0;J';G.outerHTML='"+K+"";W[W.length]=r.id;B=o(r.id)}else if(D.webkit&&D.webkit<312){I=p("embed");I.setAttribute("type",x);for(J in r)if(r[J]!=Object.prototype[J])if(J.toLowerCase()=="data")I.setAttribute("src",r[J]);else if(J.toLowerCase()=="styleclass")I.setAttribute("class",r[J]);else J.toLowerCase()!="classid"&&I.setAttribute(J,r[J]);for(var N in s)s[N]!=Object.prototype[N]&&N.toLowerCase()!="movie"&&I.setAttribute(N, s[N]);G.parentNode.replaceChild(I,G);B=I}else{I=p(C);I.setAttribute("type",x);for(var L in r)if(r[L]!=Object.prototype[L])if(L.toLowerCase()=="styleclass")I.setAttribute("class",r[L]);else L.toLowerCase()!="classid"&&I.setAttribute(L,r[L]);for(var O in s)s[O]!=Object.prototype[O]&&O.toLowerCase()!="movie"&&m(I,O,s[O]);G.parentNode.replaceChild(I,G);B=I}}return B}function m(r,s,z){var B=p("param");B.setAttribute("name",s);B.setAttribute("value",z);r.appendChild(B)}function f(r){var s=o(r);if(s&&(s.nodeName== "OBJECT"||s.nodeName=="EMBED"))if(D.ie&&D.win)s.readyState==4?k(r):F.attachEvent("onload",function(){k(r)});else s.parentNode.removeChild(s)}function k(r){if(r=o(r)){for(var s in r)if(typeof r[s]=="function")r[s]=null;r.parentNode.removeChild(r)}}function o(r){var s=null;try{s=E.getElementById(r)}catch(z){}return s}function p(r){return E.createElement(r)}function u(r,s,z){r.attachEvent(s,z);Q[Q.length]=[r,s,z]}function v(r){var s=D.pv;r=r.split(".");r[0]=parseInt(r[0],10);r[1]=parseInt(r[1],10)|| 0;r[2]=parseInt(r[2],10)||0;return s[0]>r[0]||s[0]==r[0]&&s[1]>r[1]||s[0]==r[0]&&s[1]==r[1]&&s[2]>=r[2]?true:false}function w(r,s){if(!(D.ie&&D.mac)){var z=E.getElementsByTagName("head")[0],B=p("style");B.setAttribute("type","text/css");B.setAttribute("media","screen");!(D.ie&&D.win)&&typeof E.createTextNode!=t&&B.appendChild(E.createTextNode(r+" {"+s+"}"));z.appendChild(B);if(D.ie&&D.win&&typeof E.styleSheets!=t&&E.styleSheets.length>0){z=E.styleSheets[E.styleSheets.length-1];typeof z.addRule==C&& z.addRule(r,s)}}}function q(r,s){s=s?"visible":"hidden";if(Z&&o(r))o(r).style.visibility=s;else w("#"+r,"visibility:"+s)}function y(r){return/[\\\"<>\.;]/.exec(r)!=null?encodeURIComponent(r):r}var t="undefined",C="object",x="application/x-shockwave-flash",H="SWFObjectExprInst",F=window,E=document,P=navigator,V=[],M=[],W=[],Q=[],X,aa=null,S=null,ba=null,Z=false,R=false,D=function(){var r=typeof E.getElementById!=t&&typeof E.getElementsByTagName!=t&&typeof E.createElement!=t,s=[0,0,0],z=null;if(typeof P.plugins!= t&&typeof P.plugins["Shockwave Flash"]==C){if((z=P.plugins["Shockwave Flash"].description)&&!(typeof P.mimeTypes!=t&&P.mimeTypes[x]&&!P.mimeTypes[x].enabledPlugin)){z=z.replace(/^.*\s+(\S+\s+\S+$)/,"$1");s[0]=parseInt(z.replace(/^(.*)\..*$/,"$1"),10);s[1]=parseInt(z.replace(/^.*\.(.*)\s.*$/,"$1"),10);s[2]=/r/.test(z)?parseInt(z.replace(/^.*r(.*)$/,"$1"),10):0}}else if(typeof F.ActiveXObject!=t){var B=null,G=false;try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(J){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); s=[6,0,21];B.AllowScriptAccess="always"}catch(K){if(s[0]==6)G=true}if(!G)try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(I){}}if(!G&&B)try{if(z=B.GetVariable("$version")){z=z.split(" ")[1].split(",");s=[parseInt(z[0],10),parseInt(z[1],10),parseInt(z[2],10)]}}catch(N){}}G=P.userAgent.toLowerCase();var L=P.platform.toLowerCase();z=/webkit/.test(G)?parseFloat(G.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;B=L?/win/.test(L):/win/.test(G);G=L?/mac/.test(L):/mac/.test(G);return{w3cdom:r, pv:s,webkit:z,ie:false,win:B,mac:G}}();(function(){if(D.w3cdom){g(h);if(D.ie&&D.win)try{E.write("