1

I have a rule set up in my .htaccess on a WordPress site. It looks like this:

# manual caching - force use of browser cache 
FileETag MTime Size 
<ifmodule mod_expires.c>   
   <filesmatch "\.(jpg|gif|png|css|js|ico|pdf|swf)$">
      ExpiresActive on
      ExpiresDefault "access plus 1 year"
   </filesmatch>
</ifmodule>

From things I have read, this should take care of all expiry headers. But when I run a gtmetrix or yslow test, they still give me errors like this:

http://fonts.googleapis.com/css?family=Anonymous+Pro%3Aregular%2Citalic%2Cbold%2Cbolditalic%7C&ver=3.5.1
http://www.thisismydomain.org/wp-content/plugins/wp-ui/css/css.php?styles=wpui-light%7Cwpui-blue%7Cwpui-red%7Cwpui-green%7Cwpui-dark%7Cwpui-quark%7Cwpui-alma%7Cwpui-macish%7Cwpui-redmond%7Cwpui-sevin&ver=3.5.1
http://assets.pinterest.com/images/PinExt.png
http://0.gravatar.com/avatar/41ff57b7b930a31656ab460e5a56d425?s=100&d=wavatar&r=G
http://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic,700,700italic&subset=latin,latin-ext
http://0.gravatar.com/css/hovercard.css?ver=201311ac
http://0.gravatar.com/css/services.css?ver=201311ac
http://0.gravatar.com/js/gprofiles.js?ver=201311ac
http://1.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=25&d=wavatar&forcedefault=y&r=G

Other pages show similar errors for expiry headers:

http://easyrotator.s3.amazonaws.com/.../FFF_arrow10_export.png (expiration not specified)
http://s7.addthis.com/js/300/addthis_widget.js (expiration not specified)
http://search.twitter.com/search.json?... (15 seconds)
http://connect.facebook.net/en_US/all.js (5 minutes)
https://apis.google.com/js/plusone.js (30 minutes)
http://c520866.r66.cf2.rackcdn.com/1/js/easy_rotator.min.js (33.2 minutes)
http://intensedebate.com/js/wordpressTemplateLinkWrapper2.php?... (60 minutes)
http://i.po.st/share/script/post-widget.js (3 hours)
http://www.thisismydomain.org/wp-content/plugins/wp-ui/css/css.php?styles=wpui-light%7Cwpui-blue%7Cwpui-red%7Cwpui-green%7Cwpui-dark%7Cwpui-quark%7Cwpui-alma%7Cwpui-macish%7Cwpui-redmond%7Cwpui-sevin&ver=3.5.1 (20 hours)

I'd assume this is because those particular css's and js's aren't on my domain? In such a case, is there anything I can do in order to fix this, and increase my speed scores? Or is there something else I should be doing for better results? And the one for thisismydomain ... that file extension is css.php, so I'm unsure how I could set an expiry in the htaccess for that. Thanks for any guidance anybody can offer!

Jason Weber
  • 5,653
  • 6
  • 40
  • 73
  • is `` a typo? – Amir Mar 17 '13 at 05:59
  • ugh ... sorry about that Amir ... yes, it was a typo; I fixed it ... – Jason Weber Mar 17 '13 at 06:14
  • 1
    Perhaps this helps. http://stackoverflow.com/questions/447014/website-image-caching-with-apache – Amir Mar 17 '13 at 06:58
  • Thanks Amir. That solution is essentially the same as the one I have currently ... I've tried both, and both yield the same results. Thanks for the link, though -- found some other things that are useful! – Jason Weber Mar 17 '13 at 07:28
  • 1
    You can't do anything about expiry headers on domains other than your own I'm afraid. Also, your css.php is most likely dynamic in some way, so you might not want want it cached for a year. – vancoder Mar 22 '13 at 23:47
  • Thanks Vancoder. Do you know how I'd set u that rule, to cache the css.php for a year? Appreciate the advice! – Jason Weber Mar 23 '13 at 00:27

0 Answers0