Languages
[Edit]
EN

JavaScript - track last 10 site loading times and print statistics

4 points
Created by:
Kadeem-Craig
516

This article contains logic that lets to print page loading times.

As page loading times, we understand the time necessary to load only site entry point (it means: index.html or index.php or ... - depending on technology).

Results presented are in the following way:

Site loading times statistics - JavaScript.
Site loading times statistics - JavaScript.

Usage:

  1. paste below script to body element,
  2. open Console in the Google Chrome DevTools,
  3. refresh the page many times to collect loading times (refresh more than 10 times).

Hint: change var historySize = 10; to collect the different amounts of the last times.

Source code ():

See also

Edit
  1. JavaScript - measure page loading times (connection, redirection, fetching, request, response, total)

 

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join