Home > Backend Development > PHP Tutorial > apache 怎么配置 页面引入*gz文件

apache 怎么配置 页面引入*gz文件

WBOY
Release: 2016-06-13 11:50:28
Original
2177 people have browsed it

apache 如何配置 页面引入*.gz文件
apache 如何配置 页面引入*.gz文件

比如压缩一个jquery.gz文件

如何配置引入这个文件

请教!


------解决方案--------------------
使文件用gzip先压缩再传输吗?

开启mod_deflate
sudo a2enmod deflate  
sudo /etc/init.d/apache2 restart  

在httpd.conf中添加

  
#单独设置需要压缩的类型  
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css  
AddOutputFilterByType DEFLATE application/x-javascript  
  

http://blog.csdn.net/fdipzone/article/details/8916755

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