how
long a page loads and renders (getting of the data to the database, etc.). Id
like to get the time coz ill be displaying it on the page footer using
javascript so that the end user can check it.
I
was able to search this code:
<script type="text/javascript">
var from_time = new Date();
from_time = from_time.getTime();
function show_loading_time(){
var to_time = new Date();
to_time = to_time.getTime();
var secs = (to_time - from_time) /1000;
var lit = document.getElementById('footerk');
var text = lit.innerHTML;
lit.innerHTML = text + "Load Time: " + secs + " sec";
}
</script>
var from_time = new Date();
from_time = from_time.getTime();
function show_loading_time(){
var to_time = new Date();
to_time = to_time.getTime();
var secs = (to_time - from_time) /1000;
var lit = document.getElementById('footerk');
var text = lit.innerHTML;
lit.innerHTML = text + "Load Time: " + secs + " sec";
}
</script>
No comments:
Post a Comment