Home > Backend Development > PHP Tutorial > 发送Gzip到浏览器,浏览器提示ERR_CONTENT_DECODING_FAILED

发送Gzip到浏览器,浏览器提示ERR_CONTENT_DECODING_FAILED

WBOY
Release: 2016-06-06 20:29:47
Original
1731 people have browsed it

设置了header('Content-Encoding:gzip');
header("Vary: Accept-Encoding");
但是浏览器提示了错误。该如何解决呢,谢谢

回复内容:

设置了header('Content-Encoding:gzip');
header("Vary: Accept-Encoding");
但是浏览器提示了错误。该如何解决呢,谢谢

  1. BOM头
    BOM头会导致gzip解压失败, 查看你的文件是否有BOM头, 并去掉BOM头.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template