Skip to content

is npm gzip script still useful? #2429

Closed

Description

@XhmikosR

Being that now Cloudflare is used, which means we have Brotli compression available, is the npm gzip script still useful and/or used at all in practice?

"gzip": "find build -type f \\( -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.xml' -o -name '*.json' \\) -exec gzip -kf9 {} \\;",

Actually judging from the response headers, it seems Brotli isn't enabled on Cloudflare. Any special reason for not doing this and getting rid of the whole gzip script and serving precompressed files?

Activity

  1. Trott commented on Aug 17, 2019

    @Trott
    Member

    @nodejs/build

  2. Trott commented on Aug 17, 2019

    @Trott
    Member

    @nodejs/build

    I know most people in build don't deal with the website infra, but I know some of them do. (@rvagg, I think?)

  3. rvagg commented on Aug 20, 2019

    @rvagg
    Member

    it seems Brotli isn't enabled on Cloudflare

    because new shiny things get overlooked

    I've turned it on. Give it a test and if it's working then I guess you can remove the "gzip" target. Remember to remove it from the "deploy" target too.

  4. XhmikosR commented on Aug 20, 2019

    @XhmikosR
    ContributorAuthor

    Looks good so far, not a huge gain but I guess that's normal since you were using gzip level 9 before. The diff is 1.29KB.

    I'd say someone monitors how things will go on the server side with load etc, since files aren't cache-busted and I don't know what the cache ratio is. If all is well, we drop the script and leave Brotli on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions