troubleshooting Question

[.htaccess] Help adusting gZip and Expires values...

Avatar of Eddie Shipman
Eddie ShipmanFlag for United States of America asked on
PHPApache Web Server
3 Comments1 Solution600 ViewsLast Modified:
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.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros