Skip to content

Instantly share code, notes, and snippets.

@AnkurVyas-BTC
Last active January 7, 2017 13:22
Show Gist options
  • Save AnkurVyas-BTC/9649f88f13e0fda6d4f17b9a810b91b5 to your computer and use it in GitHub Desktop.
Save AnkurVyas-BTC/9649f88f13e0fda6d4f17b9a810b91b5 to your computer and use it in GitHub Desktop.
Calculation time difference for the Page Load
// When the page starts loading
var timerStart = Date.now();
// Executes when complete page is fully loaded, including all frames, objects and images
$(window).load(function () {})
loadTime = (Date.now() - timerStart) / 1000;
$('#page_load').html(loadTime + ' s');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment