Git Product home page Git Product logo

Comments (7)

cramforce avatar cramforce commented on August 26, 2024 1

It won't help here. The API of GA cannot be dead code eliminated as it goes through the untyped ga function

from eleventy-high-performance-blog.

cramforce avatar cramforce commented on August 26, 2024

It's a 1:1 copy of https://www.google-analytics.com/analytics.js

In theory the size could be reduced, but in practice this would be quite difficult and also users of the template might use a bigger feature set of GA and actually need that JS.

from eleventy-high-performance-blog.

cramforce avatar cramforce commented on August 26, 2024

FWIW I landed e46b53c yesterday to make it easy to turn this off completely, or rather make it off by default.

from eleventy-high-performance-blog.

indcoder avatar indcoder commented on August 26, 2024

But IMO Lighthouse audit is hinting that part of the code in cached.js is redundant i.e. DCE is not happening completely; theoretically rollup should be ideally removing any extraneous code from this file.

from eleventy-high-performance-blog.

indcoder avatar indcoder commented on August 26, 2024

Thank you. I was striving to get that elusive 100 % in the LightHouse perf score๐Ÿ˜€

from eleventy-high-performance-blog.

cramforce avatar cramforce commented on August 26, 2024

One thing to consider would be to delay loading the GA file a bit. But that would only cheat the Lighthouse test and not actually improve UX

from eleventy-high-performance-blog.

indcoder avatar indcoder commented on August 26, 2024

Its all for reader's experience; Lighthouse are just indicators for that. Thank you for your time on this, I will close the issue.

from eleventy-high-performance-blog.

Related Issues (20)

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.