Current time: 12-13-2017, 11:28 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set Leverage browser caching
07-27-2016, 11:49 PM
Post: #1
How to set Leverage browser caching
Is anybody know how to set Leverage browser caching in .htaccess.

I have already below setting in my .htaccess but every time I am checking my page with pagespeed tools i am not getting expected results and seems image files are set for 5 days only.

##### Header Directives #####

<ifModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</ifModule>

# year
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
Header set Cache-Control "max-age=432000, public"
</FilesMatch>
#2 hours
<FilesMatch "\.(html|htm|xml|txt|xsl)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
<FilesMatch "\.(js|css)$">
Header set Cache-Control "max-age=3600, public"
#SetOutputFilter DEFLATE
#Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</FilesMatch>

Following are the results of my pagespeed test:
6e5fb8d27136e95/w/o/womens_clothing.jpeg (5 days)

You can view my site if you need to more investigation: http://www.shepkart.com

-- P J
http://www.shepkart.com
Find all posts by this user
Quote this message in a reply
07-29-2016, 10:19 PM
Post: #2
RE: How to set Leverage browser caching
It looks like you are using CloudFlare. CloudFlare has it's own cache settings independent of what you configure on the server and you need to make any changes in their dashboard.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-01-2016, 09:14 AM
Post: #3
RE: How to set Leverage browser caching
Could you please let me know what are the settings needs to be done at CDN level?
Find all posts by this user
Quote this message in a reply
08-01-2016, 09:47 PM
Post: #4
RE: How to set Leverage browser caching
You should check cloudflare's documentation or reach out to their support team. It is going to differ for every CDN.

Looks like this is a good place to start: https://support.cloudflare.com/hc/en-us/...-to-Cache-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)