اسکریپت محاسبه زمان بارگذاری صفحه

<head>
<style>
#load_time {
width: 20%;
position: absolute;
background-color: #fff;
opacity: .85;
padding: 12px;
text-align: center;
left: 40%;
direction: ltr;
font-family: tahoma;
font-size: 12px;
background-color: #f5f5f5;
z-index: 200;
border: 1px solid #ddd;
display: none;
}
</style>
<script src=”http://code.jquery.com/jquery-1.9.1.js”> </script>
<script>
function verPosition(){
var $this=$(“#load_time”);
$(“#load_time”).css(‘top’,$(window).height()/2);
};
$(function(){
verPosition();
});
$(window).resize(function(){
verPosition();
});

//Get Page Load Time Script ================
//http://www.webkaran.com ==================
var beforeload = (new Date()).getTime();
function getPageLoadTime(){
var afterload = (new Date()).getTime();
seconds = (afterload-beforeload) / 1000;
$(“#load_time”).html(‘زمان بارگذاری صفحه: ‘ + ‘<b>’+seconds+'</b>’ + ‘ ثانیه ‘);
$(“#load_time”).fadeIn().delay(2000).fadeOut();

}
window.onload = getPageLoadTime;

// =========================================
</script>
</head>

<body>
<div id=”load_time”></div>
</body>