May 16, 2013 at 3:41 am #41161
Is there any way at all that the Genesis framework could be overwriting rules I am setting in my .htaccess with regard to file caching?
I've added the following script to my htaccess file:
# EXPIRES CACHING
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
# EXPIRES CACHING
(I understand the times there may be a little extreme but it's just an example for now)
I've tried multiple different similar scripts, but each time I run Google's Page Speed on my site it keeps telling me I need to leverage browser caching on a large number of files from my site.
It's listing jpgs, pngs, css and js as all expiring in only 4 hours despite my .htaccess rules. This is after waiting a few minutes, clearing cache and ctrl refreshing the site after trying each different format of the htaccess code that I've tried, all of which are reported as working by a ton of people online.
My website host says that htaccess is working as normal on their side of things and they seem puzzled as to what is causing these rules to be ignored, and a colleague has suggested that the Genesis Framework may be altering the HTTP headers in some way.May 16, 2013 at 3:45 am #41162May 16, 2013 at 5:04 pm #41274
Google Page Speed isn't saying anything like that about my Genesis site. It could be a plugin perhaps?
FYI, when I was on your site last night trying to help with the comments thing, I got a 500 error on one of your pages. It eventually recovered and I was able to load it, but there were some apparent hiccups with the site. That could be simply because I'm across the pond from where (I assume) your server is, dunno. Or, it could be related to this.May 16, 2013 at 7:52 pm #41291
Do you mean my personal blog? "I am Aditya.org"?
That site isn't on Genesis, heh. That's customized Twenty Thirteen theme. 😀
Well, I never got 500 error. I hope you can investigate issue by disabling all plugins and then activating one by one to test which one is causing problem (if it is not a local issue).
May 16, 2013 at 7:59 pm #41293
No, I was talking to the OP.May 16, 2013 at 8:00 pm #41294May 17, 2013 at 2:08 am #41326
Aditya - you're right, I checked and it was an issue with the format of htaccess script allowed by my hosts. Got it fixed now
essaysnark - thanks for looking out - i think that was most likely me breaking the server i've been messing around with creating custom php functions and my php isn't too hot, so i've been breaking and fixing it all week as i try and learn!
You must be logged in to reply to this topic.