apache_conf 压缩+缓存

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 压缩+缓存相关的知识,希望对你有一定的参考价值。

<ifmodule mod_deflate.c>
<FilesMatch ".(js|css|html|htm|php|xml|gif|jpg|jpeg|png)$">
   SetOutputFilter DEFLATE
</FilesMatch>
</ifmodule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
#ExpiresByType image/png "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>

以上是关于apache_conf 压缩+缓存的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf 压缩和浏览器缓存

apache_conf htaccess与Gzip,缓存和压缩

apache_conf Laravel .htaccess文件,利用浏览器缓存和gzip压缩

apache_conf WordPress .htaccess配置文件。允许强制SSL,隐藏wp-config.php,标头ETag,GZIP压缩和过期缓存。

apache_conf gzip压缩压缩

apache_conf 启用gzip压缩