Git Product home page Git Product logo

Comments (3)

addyosmani avatar addyosmani commented on April 28, 2024
  1. I made this change (preloading our main JS bundles)

WPT: https://www.webpagetest.org/result/180426_KG_ea71fd1dc3493af22460e3cdfb291a41/
LH: https://www.webpagetest.org/lighthouse.php?test=180426_KG_ea71fd1dc3493af22460e3cdfb291a41&run=2

image

As it turns out, this change made all of our metrics worse :)

I also wanted to experiment what would happen if we just preloaded JS and not Web Fonts:

WPT: https://www.webpagetest.org/result/180426_06_217ca7d23dbdfede60b6fc08c925e23e/
LH: https://www.webpagetest.org/lighthouse.php?test=180426_06_217ca7d23dbdfede60b6fc08c925e23e&run=2

(This is an interesting sanity check of whether Lighthouse's guidance to preload Web Fonts was counter-intuitive)

image

Similarly, our metrics haven't really improved much from the original.

For now, I'm going to say let's not preload JavaScript

For record-sake, this branch was https://github.com/google/io-demo-app/tree/preload-js

Moving onto 2 - render blocking stylesheet/critical CSS optimization.

from oodle-demo.

addyosmani avatar addyosmani commented on April 28, 2024

Side-note: we may well need to switch away from Lighthouse recommending to preload WOFF files directly over to just the CSS because those WOFF references can change.

from oodle-demo.

addyosmani avatar addyosmani commented on April 28, 2024
  1. Applied manually curated critical CSS to the main page (I've previously tried to use modules like Critical on it) with inline HTML for the initial "shell". I haven't yet async loaded the current stylesheet but can do that after the first test is done.

https://www.webpagetest.org/result/180426_RJ_a990eab217841df95a95e500ee358b11/
https://www.webpagetest.org/lighthouse.php?test=180426_RJ_a990eab217841df95a95e500ee358b11&run=3

I'm expecting some improvements to FMP/FCP. We'll need to see what impact shipping down the extra critical <head> content will have on TTI.

image

A few things to unpack here: At 3.8s we have some content on screen and FMP is half of what it was originally. We need to tweak our inline styles for sure, but that's fixable. TTI is about 300ms slower using this approach.

I'm going to try using the Critical module again, this time with some of my own hand-curated styles to see if it improves anything at all.

https://www.webpagetest.org/result/180426_4D_dd3cafdd3e4d0175ff1cccbb765eb236/

This version has the inline styles and async loads CSS.

https://www.webpagetest.org/lighthouse.php?test=180426_4D_dd3cafdd3e4d0175ff1cccbb765eb236&run=1

image

We are now passing the render-blocking stylesheets audit too \o/

image

.. just as a check. I wonder if bringing that main image back for the skeleton improves FMP. Let's try it out.

https://www.webpagetest.org/result/180426_6H_9084a775c67e419bd412b5a9e14819bb/

image

Excellent. So with this change, we're able to keep TTI < 5.5s and improved FMP. Let's ship it.

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.