Browser Caching - Post ID 291401

User 458539 Photo


Registered User
1,583 posts

I have sites that have a redirect for the SSL cert in the .htaccess folder. Do you guys use the browser caching code that CC supplies here: https://www.coffeecup.com/help/articles … r-caching/

I have some image heavy sites and was told buy others and insight and Sonor that I should. Doesn't seem that Insight is up to date and not sure that Sonor is but makes for interesting conversation!

Thanks

Byron
User 2885740 Photo


Registered User
60 posts

Caching images has a positive effect on the loading time of your webpage.
I use for my own site this:

# 1 month
<FilesMatch "\.(gif|jpg|jpeg|png|ico)$">
Header set Cache-Control "max-age=2592000"
User 458539 Photo


Registered User
1,583 posts

Rene

Thanks for the response - CCs article has a very extensive addition to the htaccess file. What is your code you have there in your post? Not sure what that means - do you place your code in the htaccess file also?

Byron
User 2885740 Photo


Registered User
60 posts

Hi Byron,

These few lines of code are a tiny part of the content of my .htaccess.
It is that part that takes care of the caching of images. What it does is, it caches any image for the period of one month.
If you are looking for more info:
https://www.askapache.com/htaccess/spee … s-caching/
User 458539 Photo


Registered User
1,583 posts

Thanks Rene -

So, Im curious, what does all of this code do that is in CC's article
https://www.coffeecup.com/help/articles … r-caching/

Thanks
User 379556 Photo


Registered User
1,533 posts

I find that putting "leverage browser caching" into the main search engines finds plenty of information about this. Examples are this and this.

Frank
User 458539 Photo


Registered User
1,583 posts

Thanks guys

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.