-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Regular site</title> | ||
<script> | ||
const timing = window.performance.timing; | ||
const renderTimer = time => { | ||
const el = document.querySelector('h1'); | ||
if (el) | ||
document.querySelector('h1').innerHTML = `Regular site is loaded in - ${time} ms`; | ||
}; | ||
|
||
const interval = setInterval(() => { | ||
renderTimer(Date.now() - timing.navigationStart) | ||
}); | ||
</script> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> | ||
<script src="https://code.jquery.com/jquery-3.3.1.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.fp.min.js"></script> | ||
</head> | ||
<body> | ||
<h1>Regular site is loaded in </h1> | ||
<img src="https://user-images.githubusercontent.com/6231516/37058426-27e19c8e-2193-11e8-8670-5ff70100b326.gif"> | ||
<script> | ||
window.addEventListener('load', () => { | ||
setTimeout(() => { | ||
clearInterval(interval); | ||
renderTimer(timing.loadEventEnd - timing.navigationStart); | ||
}, 0); | ||
}, false); | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Throttled site</title> | ||
<script> | ||
const timing = window.performance.timing; | ||
const renderTimer = time => { | ||
const el = document.querySelector('h1'); | ||
if (el) | ||
document.querySelector('h1').innerHTML = `Throttled site is loaded in - ${time} ms`; | ||
}; | ||
|
||
const interval = setInterval(() => { | ||
renderTimer(Date.now() - timing.navigationStart) | ||
}); | ||
</script> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> | ||
<script src="https://code.jquery.com/jquery-3.3.1.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.fp.min.js"></script> | ||
</head> | ||
<body> | ||
<h1>Throttled site is loaded in </h1> | ||
<img src="https://user-images.githubusercontent.com/6231516/36938869-cb6b0c92-1f30-11e8-9085-26b386b7a39a.gif"> | ||
<script> | ||
window.addEventListener('load', () => { | ||
setTimeout(() => { | ||
clearInterval(interval); | ||
renderTimer(timing.loadEventEnd - timing.navigationStart); | ||
}, 0); | ||
}, false); | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Throttled site page-2</title> | ||
<script> | ||
const timing = window.performance.timing; | ||
const renderTimer = time => { | ||
const el = document.querySelector('h1'); | ||
if (el) | ||
document.querySelector('h1').innerHTML = `Throttled site page-2 is loaded in - ${time} ms`; | ||
}; | ||
|
||
const interval = setInterval(() => { | ||
renderTimer(Date.now() - timing.navigationStart) | ||
}); | ||
</script> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> | ||
<script src="https://code.jquery.com/jquery-3.3.1.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.fp.min.js"></script> | ||
</head> | ||
<body> | ||
<h1>Throttled site page-2 is loaded in </h1> | ||
<img src="https://user-images.githubusercontent.com/6231516/37059624-9d14f2e6-2196-11e8-960f-156dc1eb10ca.gif"> | ||
<script> | ||
window.addEventListener('load', () => { | ||
setTimeout(() => { | ||
clearInterval(interval); | ||
renderTimer(timing.loadEventEnd - timing.navigationStart); | ||
}, 0); | ||
}, false); | ||
</script> | ||
</body> | ||
</html> |
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