I am dipping into a new area of SEO and am trying to manipulate the .htaccess file to set expiry dates to a clients home page.
I am re-viewing what I need to do through this website -
http://gtmetrix.com/reports/www.pendulumofmayfair.co.uk
And that there is my client, then clicking the Leverage browser caching tab to view the files that need expiry dates.
So then I opened up the .htaccess file and to try it posted this below -
#Set caching on image files for 11 months
<filesMatch "\\.(ico|gif|jpg|png)$">
ExpiresActive On
ExpiresDefault "access plus 11 month"
Header append Cache-Control "public"
</filesMatch>
I then uploaded it, re scanned the page and it was still saying that I havent set the expiry dates to all those file types.
I am not sure if its the code, the file itself or something else.
Below is the whole set of files etc that need expiry dates
[LIST]
[*]http://platform.twitter.com/embed/timeline.295a00bf5122128e332d25515711dbbd.default.css (expiration not specified)
[*]http://platform.twitter.com/js/tfw/hub/client.js (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/bjqs.css (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/css/main.css (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/demo.css (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/banner.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/facebook_Icon.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Bracket.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_French.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Grandfather.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Miscellaneous.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Restoration_New.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Slider/Bracket_1.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Slider/French_1.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Slider/Furniture_1.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Slider/Grandfather_2.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Slider/Miscellaneous_1.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_Slider/Wall_1.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_furniture.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/home_wall.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/linkedIn_Icon.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/london_Shop.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/p1.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/p2.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/rss_Icon.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/twitter_Icon.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/images/youtube_Icon.jpg (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/js/bjqs-1.3.min.js (expiration not specified)
[*]http://www.pendulumofmayfair.co.uk/New/js/libs/jquery.secret-source.min.js (expiration not specified)
[*]https://s3.mylivechat.com/Customization/Template/ButtonOfflineImage_1.gif (expiration not specified)
[*]https://s3.mylivechat.com/JSML/jsml.js (expiration not specified)
[*]https://s3.mylivechat.com/livechat/template/images/inpage_1_up.png (expiration not specified)
[*]https://cdn.syndication.twimg.com/widgets/timelines/484981045083635712?domain=www.pendulumofmayfair.co.uk&lang=en&t=1561708&callback=twttr.tfw.callbacks.tl_484981045083635712_1&suppress_response_codes=true (1 minute)
[*]http://connect.facebook.net/en_US/sdk.js (20 minutes)
[*]http://platform.twitter.com/widgets.js (30 minutes)
[*]http://i1.ytimg.com/vi/LVf4uwtAGH0/sddefault.jpg (6 hours)
[/LIST]
If what i was doing would work, I believe the .jpg files should have an expiry date set to 11 months, but non of them do.
I have also added the code to enable gzip compression, and again there no positive feedback to say this has worked. I added below to the .htaccess file
<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>
Thanks