Last active
April 8, 2017 07:04
-
-
Save yefremov/bb1fbeefcd24252e1b93f512b5876fed to your computer and use it in GitHub Desktop.
Report browser performance timing and navigation data
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
function report() { | |
try { | |
return { | |
userAgent: 'navigator' in window && navigator.userAgent, | |
timing: 'performance' in window && performance.timing, | |
navigation: 'performance' in window && performance.navigation, | |
chrome: 'chrome' in window && chrome.loadTimes(), | |
serviceWorker: 'serviceWorker' in navigator, | |
}; | |
} catch (e) {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment