Gzip does not show downloading file’s size

I'm serving a large JPEG (approx. 20 MB) and I've set Nginx to gzip JPEGs. It's all working great and there is only one problem which is that the size of the file isn't shown in the browser and therefore there is no progress bar.

How can I both gzip the JPEG and have it's size show?

P.S. - Yes, I'm already sending out the size header and the size does show when gzip is disabled.

4 thoughts on “Gzip does not show downloading file’s size”

  1. what is your progress bar? when nginx response with chunk response, there’s no content-length in response header, this means you or your browser has no way to know when downloading is finished.

    Reply

Leave a Comment