Created
July 20, 2015 10:03
-
-
Save inian/2a16d5dd733ea649df43 to your computer and use it in GitHub Desktop.
First Paint
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
timing = !!(typeof window.performance !== "undefined" && typeof window.performance.timing !== "undefined"); | |
if (timing && timing.msFirstPaint && window.t_pagestart) { | |
t_firstpaint = timing.msFirstPaint - window.t_pagestart; | |
} else if (window.chrome && typeof window.chrome.loadTimes === 'function') { | |
t_firstpaint = window.chrome.loadTimes().firstPaintTime - window.chrome.loadTimes().startLoadTime; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment