Currently, most of the popular websites, like google, yahoo detect if the user connection speed is slow and then give a option to load basic version of the website instead o
You could listen to two DOM events, DOMContentLoaded and load, and calculate the difference between the time these two events are dispatched.
DOMContentLoaded is dispatched when the DOM structure is ready, but external resources, images, CSS, etc. may not be.
load is dispatched when everything is ready.
http://ablogaboutcode.com/2011/06/14/how-javascript-loading-works-domcontentloaded-and-onload/