Unable to Activate Browser Caching on DigitalOcean
-
Hi there,
Thanks for the support. I have a different method in place to cache but I found Hummingbird and wanted to give it a try. I’m not sure why this particular cache setting isn’t working but here’s what I’m dealing with…
I have Apache and expiry set to 1 year for all file types. When I load the browser caching page, it has all of the items set to ‘Disabled’. When I refresh, it says ‘false’. I should add that it has in fact updated my .htaccess file with what I believe would be correct information. I changed the file permissions from 644 to 777 temporarily to allow for this change, though I’m not sure if I must leave it as some form of write to allow updates to this in the future. I’m not using cloudflare or any CDN at the moment.
Here is what was written into my .htaccess:
<IfModule mod_expires.c> ExpiresActive On ExpiresDefault A0 <FilesMatch "\.(txt|xml|js)$"> ExpiresDefault A15552000 </FilesMatch> <FilesMatch "\.(css)$"> ExpiresDefault A15552000 </FilesMatch> <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$"> ExpiresDefault A15552000 </FilesMatch> <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$"> ExpiresDefault A15552000 </FilesMatch> </IfModule> <IfModule mod_headers.c> <FilesMatch "\.(txt|xml|js)$"> Header set Cache-Control "max-age=15552000" </FilesMatch> <FilesMatch "\.(css)$"> Header set Cache-Control "max-age=15552000" </FilesMatch> <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$"> Header set Cache-Control "max-age=15552000" </FilesMatch> <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$"> Header set Cache-Control "max-age=15552000" </FilesMatch> </IfModule>
Here is what the manual option tells me I should enter manually, if I wish:
<IfModule mod_expires.c> ExpiresActive On ExpiresDefault A0 <FilesMatch "\.(txt|xml|js)$"> ExpiresDefault A31536000 </FilesMatch> <FilesMatch "\.(css)$"> ExpiresDefault A31536000 </FilesMatch> <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$"> ExpiresDefault A31536000 </FilesMatch> <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$"> ExpiresDefault A31536000 </FilesMatch> </IfModule> <IfModule mod_headers.c> <FilesMatch "\.(txt|xml|js)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(css)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$"> Header set Cache-Control "max-age=31536000" </FilesMatch> </IfModule>
You can notice some differences between the two, and I’m not quite sure why. Thanks again, I’m that I can use Hummingbird on all of my client’s sites if we can get it working here.
Thanks
The page I need help with: [log in to see the link]
- The topic ‘Unable to Activate Browser Caching on DigitalOcean’ is closed to new replies.