YSlow report says:
Grade F on Compress components with gzip
There are 12 plain text components that should be sent compressed
http://www.mysite.com/css/c/style
http://www.mysite.com/css/c/dd.css
http://www.mysite.com/css/c/jqueryslidemenu.css
http://www.mysite.com/assets/js/browser-detection.css
http://www.mysite.com/assets/js/jquery-1.6.min.js
http://www.mysite.com/assets/js/jquery.dd.js
http://www.mysite.com/images/jquery.pngFix.pack.js
http://www.mysite.com/assets/js/jqueryslidemenu.js
http://www.mysite.com/assets/js/browser-detection.js
http://www.mysite.com/assets/js/cufon-yui.js
http://www.mysite.com/assets/js/Futura_Bk_BT_400.font.js
http://www.mysite.com/store/ajax/getpubs.php
There are 32 static components without a far-future expiration date.
(2012/2/17) http://www.mysite.com/css/c/style
(2012/2/17) http://www.mysite.com/css/c/dd.css
(2012/2/17) http://www.mysite.com/css/c/jqueryslidemenu.css
(no expires) http://www.mysite.com/assets/js/browser-detection.css
(2012/2/15) http://www.google-analytics.com/ga.js
(no expires) http://www.mysite.com/assets/js/jquery-1.6.min.js
(1997/7/26) http://www.mysite.com/j/banner_slides
(1997/7/26) http://www.mysite.com/j/multi-click-slider
(no expires) http://www.mysite.com/assets/js/jquery.dd.js
(no expires) http://www.mysite.com/images/jquery.pngFix.pack.js
(no expires) http://www.mysite.com/assets/js/jqueryslidemenu.js
(no expires) http://www.mysite.com/assets/js/browser-detection.js
(no expires) http://www.mysite.com/assets/js/cufon-yui.js
(no expires) http://www.mysite.com/assets/js/Futura_Bk_BT_400.font.js
(no expires) http://www.mysite.com/assets/js/fonts.js
(1997/7/26) http://www.mysite.com/j/jquerycourseslide.js
(no expires) http://www.mysite.com/images/menu_bg.png
(no expires) http://www.mysite.com/images/menuArrowYellow.png
(no expires) http://www.mysite.com/images/menuArrowGrey.png
(no expires) http://www.mysite.com/images/bgHomeBanner.png
(no expires) http://www.mysite.com/images/btnHomeBannerLeft.png
(no expires) http://www.mysite.com/images/btnHomeBannerRight.png
(no expires) http://www.mysite.com/images/btnLeft.png
(no expires) http://www.mysite.com/images/btnRight.png
(no expires) http://www.mysite.com/images/select-base.png
(no expires) http://www.mysite.com/images/select-cap.png
(no expires) http://www.mysite.com/images/iconComments.png
(no expires) http://www.mysite.com/images/bgRSS.png
(no expires) http://www.mysite.com/images/bgFooter.png
(no expires) http://www.mysite.com/files/Subscriptionad4.jpg
(no expires) http://www.mysite.com/images/favicon.ico
(2000/4/19) http://www.google-analytics.com/__utm.gif?...
I have this added to my .htaccess:
<IfModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</IfModule>
FileETag None
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
</IfModule>
<Files *.php>
SetOutputFilter DEFLATE
</Files>
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
</IfModule>
What adjustments need to be made in order to avoid the reports above?
Note: These are links served by ExpresssionEngine as templates with no extension:
http://www.mysite.com/css/c/style
http://www.mysite.com/j/banner_slides
http://www.mysite.com/j/multi-click-slider
ExpressionEngine gZip output is set to Yes.
Make sure you do a hard refresh of the page (ctrl+F5). I’ve noticed YSlow using the cached header info, and therefor not show the correct info.
Also make sure you have the appropriate apache module enabled. Check this by removing the ifmodule tags (except for the mod_gzip one, which section you can remove entirely).
I thinks YSlow requires to has a Expires to be at least 7 days into the future, so at least 604800 seconds.
Also remove the line:
Header unset Last-Modifiedunless you know what it does and have a special purpose for it.