Skip to content

Precompression: replace gzip by zstd #519

@LeoniePhiline

Description

@LeoniePhiline

Nowadays, all relevant browsers support brotli:

https://caniuse.com/?search=brotli

Supporting precompressed gzip should not be required any more.

Instead, cargo-leptos might want to instead precompress to the currently leading and widely supported compression algorithm, zstd:

https://caniuse.com/?search=zstd

Since not all relevant browsers support Content-Encoding: zstd yet, brotli is still required.

Proposal:

  • cargo leptos build --release --precompress precompresses using brotli and zstd, dropping gzip.
  • leptos_axum::file_and_error_handler_with_context configures the tower ServeDir to serve files precompressed with brotli and zstd.

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