Git Product home page Git Product logo

Comments (2)

addyosmani avatar addyosmani commented on April 27, 2024

Tried using webfontloader:

  <script>
    WebFontConfig = {
      google: {
        families: ['Montserrat:400,600', 'Teko:300,400,500,600']
      }
    };

    (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>

But no dice on performance. We saw some regressions using it.

Going to experiment with a few other options from https://github.com/zachleat/web-font-loading-recipes/#experiments-in-progress

from oodle-demo.

addyosmani avatar addyosmani commented on April 27, 2024

The below are a series of (mostly failing) experiments. I'm hoping to wrap up what I consider sane preconnect/preload/web-font guidance tomorrow. Although there are lots of best practices captured in ours docs, they aren't easy to adopt and I'm wary of scaring folks (e.g self-hosting, preloading, subsetting etc) are not always going to be accessible.

I'm considering doing two last simple experiments: preconnect to the two Google Fonts domains to CSS and font resources. Then, attempt to locally host + preload. That's about it.

==========

with preconnect, preloading woff

TTI 8s
https://www.webpagetest.org/result/180427_W8_0b63f25bed9c96b064c0e7c4841a2911/
https://www.webpagetest.org/lighthouse.php?test=180427_W8_0b63f25bed9c96b064c0e7c4841a2911&run=3

second run TTI 6.8
https://www.webpagetest.org/result/180427_H9_1017e83765be1d927b41ba508fe161d6/

no preconnect, preloading woff
TTI 6.7
https://www.webpagetest.org/lighthouse.php?test=180427_SZ_640124eeed7f3d94b519e5f0b53d0722&run=1
https://www.webpagetest.org/result

https://www.webpagetest.org/result/180427_DP_78d4ffc556df95ddc32cb517021adaba/
6.08 TTI lol
https://www.webpagetest.org/lighthouse.php?test=180427_DP_78d4ffc556df95ddc32cb517021adaba&run=2

no preconnect, preloading fonts css
https://www.webpagetest.org/result/180427_1A_3791230c1d7c1175f8150ed6f3f2316d/
7s
https://www.webpagetest.org/lighthouse.php?test=180427_1A_3791230c1d7c1175f8150ed6f3f2316d&run=3

from oodle-demo.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.