How to get website loading time in browser

Understanding the website and webpage loading time is very important. You can check the page loading time through javascript code. If you want to get the webpage loading time through javascript. This very easily achievable using javascript. If you want to get the webpage loading time through javascript. This easily achievable using javascript. We have code to get website loading time in browser

How to get website loading time in browser

You just need to use following code in your head tag


var starttime = new Date().getTime();
window.onload=function() {
 var loading_time = new Date().getTime()-starttime;

 alert('Webpage loading time in ' + loading_time + 'ms - milisecond');
}

 

How to get website loading time in browser

How to get website loading time in browser

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *