Created
January 20, 2013 02:32
-
-
Save tupy/4576334 to your computer and use it in GitHub Desktop.
Render time in a browser
This file contains 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
//http://stackoverflow.com/questions/2516665/how-can-i-monitor-the-rendering-time-in-a-browser | |
var renderStart = new Date().getTime(); | |
window.onload=function() { | |
var elapsed = new Date().getTime()-renderStart; | |
// send the info to the server | |
alert('Rendered in ' + elapsed + 'ms'); | |
} | |
// ... usual HTML starts here ... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment