Created
April 25, 2022 22:35
-
-
Save matasaru/29cac964c1a55d365f5ec9e780d517f9 to your computer and use it in GitHub Desktop.
perf optimized <head> from https://csswizardry.com/gyhs/demos/fixed.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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"/> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0"/> | |
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"/> | |
<title>Get Your <head> Straight</title> | |
<script> | |
var script = document.createElement('script'); | |
script.src = "https://slowfil.es/file?type=js&delay=1000&async-snippet-in-head"; | |
document.head.appendChild(script); | |
</script> | |
<script> | |
// Slow JS | |
function wait(ms) { | |
var start = Date.now(), | |
now = start; | |
while (now - start < ms) { | |
now = Date.now(); | |
} | |
} | |
wait(1000); | |
</script> | |
<script src="https://slowfil.es/file?type=js&delay=1500&sync-in-head&01"></script> | |
<script src="https://slowfil.es/file?type=js&delay=1000&sync-in-head&02"></script> | |
<link rel="stylesheet" href="https://slowfil.es/file?type=css&delay=1000&sync-in-head"/> | |
<link rel="stylesheet" href="https://slowfil.es/file?type=css&delay=1000&imported-from-css"/> | |
<link rel="stylesheet" href="https://slowfil.es/file?type=css&delay=1000&imported-from-html"/> | |
</head> | |
<body> | |
<h1>Get Your <code><head></code> Straight</h1> | |
<form> | |
<input type="hidden" id="csrf_token" value="ZGlkIHlvdSBmaW5kIG1lPwo="/> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment