To get starting time, we need to measure it right after page started to load, it is right after opening <head> tag:
Then we create this function to do the math and put result in a <p id = "loadingtime"></p> tags with specified id - "loadingtime".
After that we should our function in onload event, which fires, just after page finished to load.
And we get page loading time.
You may also be interested in:
Powered by BlogAlike.com