开发者

Apache Deflate on CSS and JS in subdirectory - No Compression

开发者 https://www.devze.com 2023-02-16 07:15 出处:网络
Website: http://taylorsbackyardcenter.ca/store So I\'m finishing an OSCommerce site and I\'m implementing compression, caching, and site optimization.I have run into a problem with deflate.

Website: http://taylorsbackyardcenter.ca/store

So I'm finishing an OSCommerce site and I'm implementing compression, caching, and site optimization. I have run into a problem with deflate.

Both Page Speed and YSlow inform me that:

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).

I think my .htaccess file is correct:

#############################
## 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"
#############################

Please advise


Generally they mean mini-fying, or removing useless empty space, there should be a link that says view optimized version or download optimized version. Just save it over top of your old one and upload it to your server. That should take care of it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号