Change the Leverage browser caching
-
When i check my blog performance via https://www.gtmetrix.com, it returns this error under Leverage browser caching.
The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources
How do i change the expiration time?
-
Try the “Browser Cache” tab of W3TC. It contains “Expires header lifetime” edit boxes. Default “Expires header lifetime” values :
for “CSS & JS” and “Media & Other Files”
31536000 seconds [1 year]for “HTML & XML”
3600 seconds [1 hour](For reference, 1 week = 604800 seconds)
Hello tgeorge
I still have a problem after changed the recommended timings specified above.
Here is the result
https://gtmetrix.com/reports/www.onepriceindia.co.in/JfDKHAJo
What i have to do now?
Go to the “Browser Cache” tab. Use the following settings for both the “CSS & JS” section and the “Media & Other Files” section :
[check] Set expires header
Expires header lifetime: 31536000 seconds
[check] Set cache control header
Cache Control policy: cache with max-ageDon’t forget to save settings, and to click on “Re-Test Page” on the GTmetrix site.
Hello tgeorge
I did as you suggested, But still has same problem. Here is htaccess code
and
gtmetrix report
https://gtmetrix.com/reports/www.onepriceindia.co.in/mIE6jwJI
Hmm… It should work. I have exactly the same “Browser Cache” settings, and I get no GTmetrix errors for my site. This maybe means that your webhost does not support the mod_expires module (which is required by W3TC’s “Browser Cache” feature). I know almost nothing about modules, but here is a description :
“mod_expires module is responsible for setting of the Expires HTTP header and max-age directive of Cache-Control HTTP header in server responses.”
You should ask your webhost whether mod_expires is supported. If it’s not supported, you’ll have to forget about the “Browser Cache” feature. Sorry.
Hello tgeorge
when i inquire with server management team, they said that mod_rewrite is already activated in the server.
Note : I have used rackspace cloud to host media files. Media files hosted in sub-domain of https://www.onepriceindia.com
But WordPress installed in https://www.onepriceindia.co.in
Is the problem due to image hosted in another domain name?
Hello Frederick Townes
I am keenly awaiting for you valuable suggestion to get rid of this issue.
Hope you might reply soon.
Sorry, I have no experience with sub-domains. It is possibly the cause of the problem. In fact, you can make a test, by moving one or more images from your sub-domain to your main domain. See whether they disappear from the “Leverage browser caching” list. But I can’t help you further, because of my lack of knowledge. I hope someone else helps you.
Your failures are mostly subdomains. Any failures for your main domain name are either because you haven’t actually deployed your browser cache settings and are in preview mode or because mod_expires or another required module isn’t installed or enabled in apache.
Hello Frederick Townes
Thanks for your reply.
1.I have deployed the settings. Please check the .htaccess file here https://pastebin.com/Knu0z88v
htaccess will ensures about settings have beed deployed successfully.2. I did contacted the server administrators and they confirmed that mod-rewrite installed and activated in my server.
Here i remind you again, i had setting up another TLD to host the image files.
WordPress installed in https://www.onepriceindia.co.in
Image files (CDN) located in https://a.onepriceindia.com and https://m.onepriceindia.comDoes this a reason why i am getting leverage browser cache warnings?
Please help me to get rid of leverage browser caching issue.Hello Frederick Townes
I am seriously needed ur kind help.
Help me to resolve the above issue.
Hello Frederick Townes
I thought the issue may be images which is hosted in another domain https://m.onepriceindia.com other than where the wordpress which is installed
Even i tried to change the CDN domain from https://m.onepriceindia.com to the same wordpress domain as https://cdn.onepriceindia.co.in
Still its gtmetrix warns the leverage browser cache issue still exists.
here is the gtmetrix analysis page which done on
https://gtmetrix.com/reports/www.onepriceindia.co.in/g7oe9HLgEven after i deployed all the settings. Here is .htaccess file how does it appears in my host. https://pastebin.com/QGnJ8LmZ
As well as here is the screenshot of my plugin settings page. https://i.imgur.com/iAKKU.gif
My server administrators who confirm that mod-rewrite module which enabled in our server. I tried my level best and no other go.
Will you please help me? I am eagerly awaiting for your reply.
Hello Frederick Townes
After a long frustration, finally i found the problem why i am getting leverage browser cache issue when i use W3 total cache plugin with rackspace (CDN) cloud files.
When i discuss with rackspace linux administrators in this regard, they suggest me to follow instructions as described in the below link to overcome leverage browser cache issue.
https://cutfromthenorth.com/set-far-future-expires-headers-with-rackspace-cloud-files/
https://blog.html-color-codes.info/2011/06/how-to-set-far-future-expire-headers-on-rackspace-cdn/
https://www.rackspace.com/cloud/blog/2011/03/31/extending-ttl-for-cloud-files-cdn-users/
The above suggestions seems, plugin need to update with some additional coding. Here i request you to update w3 total cache plugin with relevant code to stepping into next milestone.
Expecting your kind co-operation
With regards
SelvamCan you please submit a bug submission form from the support tab of the plugin?
Hello Frederick Townes
Happy to meet you again after long time. I have already submitted the issue (3 days before) via bug submission form which refers this post.
i am really happy about your special care about my thread.
Kindly do the needful
With regards
Selvam.S
- The topic ‘Change the Leverage browser caching’ is closed to new replies.