You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Files which are pre-compressed with Brotli compression are not serving the appropriate compression headers. The file itself is served, but browsers do not decompress it when the HTTP header isn't present.
The text was updated successfully, but these errors were encountered:
Brotli compression cannot be reliably detected on files at runtime. According to this study, there is a 95% false positive ratio, meaning practically nothing can be trusted. Brotli does not have identifying bytes, so attempting to automate this will be buggy at best. This differs from gzip compression, which does have identifying bytes (and could therefore be detected).
An alternative solution would be maintaining a list of files (or filename patterns, http route patterns, etc) which are pre-compressed. This list could be referenced at runtime, applying the appropriate HTTP response headers for brotli-compressed files. A lookup like this adds latency to response times, but it would be minimal and unperceivable. Most major object storage platforms (like S3) do something similar.
The alternative solution could be an option, similar to other runtime processing options.
Files which are pre-compressed with Brotli compression are not serving the appropriate compression headers. The file itself is served, but browsers do not decompress it when the HTTP header isn't present.
The text was updated successfully, but these errors were encountered: