(function(){
const t = window.performance && performance.timing;
if (!t) {
return;
}
const loadTime = (t.loadEventEnd - t.navigationStart) / 1000;
alert(`This page loaded in ${loadTime} seconds`);
}())
Last active
April 18, 2018 01:27
-
-
Save xydiva/3f54dfcbe6e8b4830439232ea485a3d7 to your computer and use it in GitHub Desktop.
统计加载时间
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment