在子目录中的CSS和JS上的Apache Deflate - 无压缩

时间:2011-03-10 23:14:28

标签: apache .htaccess oscommerce deflate mod-deflate

网站:http://taylorsbackyardcenter.ca/store

所以我正在完成OSCommerce网站,我正在实施压缩,缓存和网站优化。我遇到了放气问题。

Page Speed和YSlow都告诉我:

Compressing http://taylorsbackyardcenter.ca/store/includes/functions/js/jquery.min.js could save 46.5KiB (65% reduction).
Compressing http://taylorsbackyardcenter.ca/store/includes/sts_templates/taylor/taylor_stylesheet.css could save 9.7KiB (79% reduction).

我认为我的.htaccess文件是正确的:

#############################
## Site Speed/Optimization ##
#############################
# MIME Type Fixes
AddType image/x-icon .ico
AddType text/javascript .js
AddType text/css .css
#############################
# Compress
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css 
AddOutputFilterByType DEFLATE text/javascript application/x-javascript application/javascript
#############################
# Proxy fix
Header append Vary User-Agent env=!dont-vary
# Set ETag
FileETag MTime Size
# Public Caching
Header set Cache-Control "public, no-transform"
# Expires Headers
ExpiresActive on
ExpiresByType text/html "access plus 30 seconds"
ExpiresByType text/css "access plus 3 months"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/gif "access plus 3 months"
ExpiresByType image/jpeg "access plus 3 months"
ExpiresByType image/png "access plus 3 months"
ExpiresByType image/x-icon "access plus 1 year"
#############################

请告知

1 个答案:

答案 0 :(得分:0)

一般来说,它们意味着迷你,或者删除无用的空白空间,应该有一个链接,说明查看优化版本或下载优化版本。只需将其保存在旧版本之上并将其上传到您的服务器即可。这应该照顾它。