Skip to content

Instantly share code, notes, and snippets.

@yefremov
Last active April 8, 2017 07:04
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 yefremov/bb1fbeefcd24252e1b93f512b5876fed to your computer and use it in GitHub Desktop.
Save yefremov/bb1fbeefcd24252e1b93f512b5876fed to your computer and use it in GitHub Desktop.
Report browser performance timing and navigation data
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