Introduction:
I am going to explain here how to calculate page loading time using javascript with help of time function.
Explanation:
Here i calculated before loading and after loading time of page then i reduced time from after loading to before loading,here i used "(new Date()).getTime() " function for calculating time.
I hope you understand from below code:
Calculate before lading time:
beforeload = (new Date()).getTime();
Calculate after loading time:
afterload = (new Date()).getTime();
I am going to explain here how to calculate page loading time using javascript with help of time function.
Explanation:
Here i calculated before loading and after loading time of page then i reduced time from after loading to before loading,here i used "(new Date()).getTime() " function for calculating time.
I hope you understand from below code:
Calculate before lading time:
beforeload = (new Date()).getTime();
Calculate after loading time:
afterload = (new Date()).getTime();