Fork me on GitHub
代码改变世界

性能优化之 缓存 压缩配置

2013-03-13 10:11  freefei  阅读(192)  评论(0编辑  收藏  举报
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 中
@ https://github.com/ranmufei

校友通微信小程序

校友通微信小程序