Do I need/want gzip compression when using HTTPS?

2019-06-25 06:45发布

问题:

Does using HTTPS already include (transparent) content compression or should I still worry about negotiating with the browser whether to compress my Servlet output? If HTTPS already has compression, is it unconditional or does it need to be configured/negotiated/enabled?

回答1:

TLS by default doesn't enable compression, though it (compression) is defined in TLS standard and can be enabled if both parties support it. So it's better to not rely on it and request it on HTTP level.



回答2:

HTTPS only provides encryption. It does not compress the content. You should still negotiate gzip compression.