gpt4 book ai didi

javascript - 如何恢复 GZIP 压缩?

转载 作者:行者123 更新时间:2023-11-27 23:50:54 25 4
gpt4 key购买 nike

我在 .htaccess 文件中添加了几行来压缩文件并提高网站速度。

但是之后,一些 JavaScript 就无法正常工作了。所以我从 .htaccess 文件中删除了这些行....

直到这些 javascript 出现问题......

如何恢复状态?

.htaccess 中添加并随后删除的代码:

# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

最佳答案

您可以使用RemoveOutputFilter指令。

RemoveOutputFilter text/plain
RemoveOutputFilter text/html
RemoveOutputFilter text/xml
RemoveOutputFilter text/css
RemoveOutputFilter application/xml
RemoveOutputFilter application/xhtml+xml
RemoveOutputFilter application/rss+xml
RemoveOutputFilter application/javascript
RemoveOutputFilter application/x-javascript

关于javascript - 如何恢复 GZIP 压缩?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32717374/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com