obs
obs

Reputation: 807

use fallback for zstd with mod_deflate

I just realized the (shared hosting) server I'm using has zstd encoding enabled (Accept-Encoding: gzip, deflate, br, zstd). But since zstd compression is not yet supported in Safari I would like to use brotli as a fallback. Right now I'm using brotli like this:

<IfModule mod_deflate.c>
    <filesMatch "\.(js|css|html|php|svg|woff|woff2|ico|json|geojson|pbf)$">
        SetOutputFilter BROTLI_COMPRESS
    </filesMatch>
</IfModule>

Is there a way to use zstd and automatically fall back to brotli, if the browser doesn't support zstd?

Upvotes: 0

Views: 27

Answers (0)

Related Questions