Last active
January 7, 2017 13:22
-
-
Save AnkurVyas-BTC/9649f88f13e0fda6d4f17b9a810b91b5 to your computer and use it in GitHub Desktop.
Calculation time difference for the Page Load
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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