為了減少客戶端對服務端資源的請求
在apache%C
“#LoadModule expires_module modules/mod_expires
”前面的#號
Httpd
ExpiresActive on
#緩存
ExpiresBytype text/css "access plus
ExpiresByType application/x
ExpiresByType image/jpeg "access plus
Expiresbytype image/gif "access plus
加入下面內容
# mod_expires
ExpiresActive on
ExpiresDefault A
ExpiresBytype text/css “access plus
ExpiresByType text/javascript “access plus
ExpiresByType application/x
ExpiresByType application/x
ExpiresByType image/* “access plus
ExpiresByType text/html “access plus
<FilesMatch “
ExpiresDefault A
</FilesMatch>
</IfModule>
默認緩存時間是
From:http://tw.wingwit.com/Article/program/PHP/201311/20858.html