性能优化之 缓存 压缩配置

apache 服务器开启 浏览器缓存 和html css 压缩配置 [php] <IfModule mod_expires.c> ExpiresActive On ExpiresDefault A600 ExpiresByType image/x-icon A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType text/css A604800 ExpiresByType image/gif A2592000 ExpiresByType image/png A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType text/plain A86400 ExpiresByType application/x-shockwave-flash A2592000 ExpiresByType video/x-flv A2592000 ExpiresByType application/pdf A2592000 ExpiresByType text/html A600 <FilesMatch ".(js|css|xml|gz)$"> Header append Vary Accept-Encoding </FilesMatch> </IfModule> [/php] 以上代码添加到 htaccess 中

你可能感兴趣的:(性能优化)