apache 页面缓存机制,图片 缓存 (mod_expires)
2015-12-11 10:16
447 查看
#LoadModule expires_module modules/mod_expires.so (去掉#号)
我把配置信息写到 .htaccess文件中
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html A1000
#
GIF有效期为1个月
ExpiresByType
image/gif A2592000
#
HTML文档的有效期是最后修改时刻后的一星期
ExpiresByType
text/html M604800
#以下的含义类似
ExpiresByType
text/css "now plus 2 months"
ExpiresByType
text/js "now plus 2 days"
ExpiresByType
image/jpeg "access plus 2 months"
ExpiresByType
image/bmp "access plus 2 months"
ExpiresByType
image/x-icon "access plus 2 months"
ExpiresByType
image/png "access plus 2 months"
</IfModule>
如图
我把配置信息写到 .htaccess文件中
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html A1000
#
GIF有效期为1个月
ExpiresByType
image/gif A2592000
#
HTML文档的有效期是最后修改时刻后的一星期
ExpiresByType
text/html M604800
#以下的含义类似
ExpiresByType
text/css "now plus 2 months"
ExpiresByType
text/js "now plus 2 days"
ExpiresByType
image/jpeg "access plus 2 months"
ExpiresByType
image/bmp "access plus 2 months"
ExpiresByType
image/x-icon "access plus 2 months"
ExpiresByType
image/png "access plus 2 months"
</IfModule>
如图
相关文章推荐
- 【飘逸的Python】 在Apache2中部署Tornado应用
- 添加php7到wamp后,启动apache提示扩展错误bug调试
- Ubuntu 下 Apache2服务器的搭建
- apache 开启gzip压缩 (gzip 等同于mod_deflate )
- 关于阿里云上Linux装jdk与apache
- Linux 源码安装apache 与常见错误解决
- CentOS 6.5 系统 LAMP(Apache+MySQL+PHP)源码安装步骤
- Mac OS apache php配置
- Mac OS apache php配置
- org.apache.struts2.json.JSONException:
- Apache的配置详解,最好的Apache配置文档。
- Apache的配置详解,最好的Apache配置文档。
- APACHE POI教程 --java应用程序用POI与Excel交互
- Apache Spark 学习笔记(1)
- java操作POI 错误 org.apache.xmlbeans.XmlOptions
- Apache编译与安装 RedHat enterprises 6.2
- Apache Stratos探究:概念--cloudburst和Hybrid Cloud
- 让apache支持CGI
- eclipse中启动服务器正常,地址栏输入访问地址出现500,org.apache.commons.lang.exception.NestableRuntimeException
- org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: unknown encoding