6. {Code} Page Load Time
{
<html>
<head>
<script type="text/javascript">
var start = new Date().getTime();
function onLoad() {
var now = new Date().getTime();
var latency = now - start;
alert("page loading time: ” + latency);
}
</script>
</head>
<body onload="onLoad()">
……
}
15. without external dependencies
# of
Domains
# of
Resources
Total
Bytes
DNS
[ms]
Connect
[ms]
With Third Party Content
26
176
2856 Kb
1286,82
1176,09
Without Third Party
Content
2
59
897 Kb
0,91
22,25
22. {Code} Page Activity control
{
function onLoad() {
document.addEventListener("webkitvisibilitychange",
visibilityChanged, false);
}
function visibilityChanged() {
if (document.webkitHidden) // relax
}
else // do heavy stuff
}
* Chrome version