3 ms·
>what about the web The browser sends the server a request header indicating which compression methods it understands. Current Firefox for example sends A
by wongarsu 10y ago
>what about the web
The browser sends the server a request header indicating which compression methods it understands. Current Firefox for example sends
Accept-Encoding: gzip, deflate, br
meaning the server is free to send a response compressed with either gzip, deflate or brotli. Or the server can choose to send the data uncompressed.
This means the adoption path for the web would be an implemtation in at least one major browser, which advertises this capability with the Accept-Encoding header. Then any server can start using Zstandard for clients accepting it.
- ohitsdom 10y agoNice, so really browsers and servers can implement it independently. Seems elegant, I like that browsers can advertise multiple compression formats. Thanks for the info!
- riboflava 10y agoIt's also possible to implement a decompressor in javascript to support browsers which don't do it natively. The performance would likely suck but if you're truly bandwidth constrained and don't mind users having a bit of a lag, it's an option...
- hueving 10y agoAssuming the size of the decompressor isn't larger than the savings you gained from using this compression algo over another...