Created
October 30, 2017 10:35
-
-
Save laphilosophia/3ae762eabff2bda026ee6c9c57a6c1c6 to your computer and use it in GitHub Desktop.
Performance Tips.
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
// Browser loading time | |
let calc = () => { | |
const domint = window.performance.timing.domInteractive; | |
const reqstr = window.performance.timing.requestStart; | |
return domint - reqstr; | |
} | |
// Resource timing | |
let perf = () => { | |
return window.performance.getEntriesByType('resource') || []; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment