I am incorporating some caching and compressing lines into the htaccess of a few sites to improve their webpagetest results. However on any site I place my htaccess code the two items “compress images” and “progressive jpegs” disappear and are replaced with one N/A square.
Any help with how to actually get an A on these two items would be appreciated (the idea is to show the test results to clients).
Sample tests:
Without caching code: http://www.webpagetest.org/result/140825_RE_M6E/
With caching code: http://www.webpagetest.org/result/140825_Q8_M4X/
Without caching code: http://www.webpagetest.org/result/140825_RK_MG6/
With caching code: http://www.webpagetest.org/result/140825_01_MEG/
For first time byte we will simply recommend changing hosts from a shared hosting to a vps or dedicated, but other items we would really like to be able to show A’s.
Thanks for any information or help on this.
Edit - Here is the code I am putting into the htaccess if that helps any:
===
Enable keep-alive
Header set Connection keep-aliveCompress text, html, javascript, css, xml:
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
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE image/jpeg
AddOutputFilterByType DEFLATE image/gif
AddOutputFilterByType DEFLATE image/png
Or, compress certain file types by extension:
SetOutputFilter DEFLATE
BROWSER CACHING
AddType text/javascript .js
ExpiresActive On
ExpiresDefault “access plus 1 seconds”
ExpiresByType image/x-icon “access plus 2692000 seconds”
ExpiresByType image/jpeg “access plus 2692000 seconds”
ExpiresByType image/png “access plus 2692000 seconds”
ExpiresByType image/gif “access plus 2692000 seconds”
ExpiresByType application/x-shockwave-flash “access plus 2692000 seconds”
ExpiresByType text/css “access plus 2692000 seconds”
ExpiresByType text/javascript “access plus 2692000 seconds”
ExpiresByType application/x-javascript “access plus 2692000 seconds”
ExpiresByType text/html “access plus 600 seconds”
ExpiresByType application/xhtml+xml “access plus 600 seconds”
Header set Cache-Control “max-age=2692000, public”
Header set Cache-Control “max-age=600, private, must-revalidate”
Header unset ETag
Header unset Last-Modified