Each resource is fetched and its transfer metrics are read from the Resource Timing API.
encoded is the size on the wire, decoded the size after decompression.
| URL | Status | Content-Encoding | Content-Type | Encoded | Decoded | Ratio |
|---|
Browsers can only produce gzip / deflate via CompressionStream.
Use curl for br request bodies (see the commands below).
/echo – echoes the decompressed request body
# Response: brotli
curl -s -o /dev/null -D - -H 'Accept-Encoding: br' http://localhost:8085/data/lorem.txt
# Response: gzip
curl -s -o /dev/null -D - -H 'Accept-Encoding: gzip' http://localhost:8085/data/lorem.txt
# Request: brotli body (requires the brotli CLI)
echo '{"hello":"brotli"}' | brotli -c | curl -s --data-binary @- \
-H 'Content-Type: application/json' -H 'Content-Encoding: br' http://localhost:8085/inspect.json
# Request: gzip body
echo '{"hello":"gzip"}' | gzip -c | curl -s --data-binary @- \
-H 'Content-Type: application/json' -H 'Content-Encoding: gzip' http://localhost:8085/inspect.json