Skip to content

Instantly share code, notes, and snippets.

@tupy
Created January 20, 2013 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tupy/4576334 to your computer and use it in GitHub Desktop.
Save tupy/4576334 to your computer and use it in GitHub Desktop.
Render time in a browser
//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