Replies: 2 comments 3 replies
-
I'm a bit hesitant to remove compression for specific responses (e.g a PNG file created with ZLEVEL=1, won't be compressed). I think it might be better to just remove any middleware https://github.com/developmentseed/titiler/blob/master/titiler/main.py#L48-L58 and let the users do what they want from here. |
Beta Was this translation helpful? Give feedback.
-
Your analysis is mostly correct, except you miss that the response is still compressed on firefox, just with gzip encoding instead of brotli. When Line 57 in d93b14a |
Beta Was this translation helpful? Give feedback.
-
When we use tile endpoint
/{z}/{x}/{y}.png
in any web map clients (e.g. OpenLayers but it is easy to reproduce just with a simple<img src="..." />
tag) browsers setAccept-Encoding
header:This header triggers BrotliMiddleware. That is, the middleware compresses already compressed files (the PNG image format already uses compression internally) increasing its size:
Beta Was this translation helpful? Give feedback.
All reactions