Load Google Font with asynchronously or deferred without Font Face Observer

You can load the web fonts asynchronously with this script:

<script>
   WebFontConfig = {
      typekit: { id: 'xxxxxx' }
   };

   (function(d) {
      var wf = d.createElement('script'), s = d.scripts[0];
      wf.src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js";
      wf.async = true;
      s.parentNode.insertBefore(wf, s);
   })(document);
</script>

You’ll need this library, it’s pretty easy to implement. I’ve learn this from a course I took recently, Responsive Web Design Fundamentals, if you’re interested you can check it out here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)