Created
October 21, 2014 20:40
-
-
Save macbre/bcf74b0d68fb6a59f68c to your computer and use it in GitHub Desktop.
Chrome's first paint timing
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
// first paint in chrome from https://github.com/addyosmani/timing.js | |
var hasFirstPaint = 0; | |
if (window.chrome && window.chrome.loadTimes) { | |
var paint = window.chrome.loadTimes().firstPaintTime * 1000; | |
var firstPaint = paint - (window.chrome.loadTimes().startLoadTime*1000); | |
var firstPaintLeft = (firstPaint / loaded)*100; | |
hasFirstPaint = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment