Skip to content

Instantly share code, notes, and snippets.

@PaulRayden
Forked from gbertb/font-awesome.js
Created March 26, 2020 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulRayden/e65ad63cc7ee3834e7b3f565fc796a72 to your computer and use it in GitHub Desktop.
Save PaulRayden/e65ad63cc7ee3834e7b3f565fc796a72 to your computer and use it in GitHub Desktop.
How to load Font Awesome asynchronously
<!--
How to load Font Awesome asynchronously
Use: Just put this script on the bottom/footer of your web
-->
<script type="text/javascript">
(function() {
var css = document.createElement('link');
css.href = '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css';
css.rel = 'stylesheet';
css.type = 'text/css';
document.getElementsByTagName('head')[0].appendChild(css);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment