Skip to content

Instantly share code, notes, and snippets.

@Asikur22
Created April 23, 2019 13:15
Show Gist options
  • Save Asikur22/6de15eb99b05bb7401bc23e9661b04c5 to your computer and use it in GitHub Desktop.
Save Asikur22/6de15eb99b05bb7401bc23e9661b04c5 to your computer and use it in GitHub Desktop.
Eliminate Render-Blocking Font Awesome CSS
<script>
function loadCSS(e, t, n) {
"use strict";
var i = window.document.createElement("link");
var o = t || window.document.getElementsByTagName("script")[0];
i.rel = "stylesheet";
i.href = e;
i.media = "only x";
o.parentNode.insertBefore(i, o);
setTimeout(function () { i.media = n || "all" })
}
loadCSS("https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment