Skip to content

Instantly share code, notes, and snippets.

@Luxato
Last active April 1, 2019 08:13
Show Gist options
  • Save Luxato/926eef493f3ec56ec745282d5cf0885d to your computer and use it in GitHub Desktop.
Save Luxato/926eef493f3ec56ec745282d5cf0885d to your computer and use it in GitHub Desktop.
Deferring CSS assets
<html>
<head>
<!-- This will make the CSS load asynchronously, and also it takes care of users without javascript -->
<link rel="stylesheet" href="styles.css" media="none" onload="if(media!='all')media='all'">
<noscript><link rel="stylesheet" href="styles.css"></noscript>
</head>
</html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment