TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is it bad practice in 2023 to force GZIP compression?

8 点作者 johnnyApplePRNG将近 2 年前
I have setup an nginx reverse proxy to only ever call for and cache gzipped responses from the upstream server.<p>I have seen some older posts about forcing gzip on all requests but unzipping the pre-compressed content if the client specifically requests non-gzipped content.<p>I am considering not implementing the above sentence for performance reasons.<p>How impactful will essentially ignoring browser gzip preferences affect my user&#x27;s experience?<p>I am under the impression that only computers running 20+ year old browsers will be affected by the inability to decompress gzipped content.<p>Is there anything else I am not thinking of? Do any clients not enable gzip for a good reason I am not thinking of? Thank you!

1 comment

josephcsible将近 2 年前
Forget about compatibility for a minute. Aren&#x27;t you opening yourself up to attacks like CRIME and BREACH by ignoring clients&#x27; requests to not use compression?
评论 #36695294 未加载
评论 #36691098 未加载