Apache 小小微調

LoadModule headers_module modules/mod_headers.so
LoadModule expires_module modules/mod_expires.so

ExpiresActive On
ExpiresByType text/css A259200
#text/css 類型文件的過期設置為“瀏覽後259200秒”
ExpiresByType application/x-javascript A259200
# application/x-javascript 類型文件的過期設置為“瀏覽後300秒”
ExpiresByType image/png A2592000
#image/png類型文件的過期設置為“瀏覽後2592000秒”
ExpiresByType image/gif A2592000
#image/gif類型文件的過期設置為“瀏覽後2592000秒”
ExpiresByType application/x-shockwave-flash A2592000
# application/x-shockwave-flash類型文件的過期設置為“瀏覽後2592000秒”

LoadModule deflate_module modules/mod_deflate.so
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css

Related Posts