The time required by the browser to load the page:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var begin=new Date().valueOf();
onload=function(){
var end=new Date().valueOf();
alert('This page took '+[end-begin]+' milliseconds to load');
}
</script>
</head>
<body>
</body>
</html>
Notes: Must be the first thing in the head as soon as scripts are allowed there, as shown. Time will only be approximate as it doesn't include loading of meta data or title, etc. But, these usually take very little time.
Also, this is just the concept. Any particular implementation could, and probably should be a bit different.
Bookmarks