WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Change the Leverage browser caching (25 posts)

  1. vamban
    Member
    Posted 3 years ago #

    When i check my blog performance via http://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?

  2. tgeorge
    Member
    Posted 3 years ago #

    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)

  3. vamban
    Member
    Posted 3 years ago #

    Hello tgeorge

    I still have a problem after changed the recommended timings specified above.

    Here is the result

    http://gtmetrix.com/reports/www.onepriceindia.co.in/JfDKHAJo

    What i have to do now?

  4. tgeorge
    Member
    Posted 3 years ago #

    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-age

    Don't forget to save settings, and to click on "Re-Test Page" on the GTmetrix site.

  5. vamban
    Member
    Posted 3 years ago #

    Hello tgeorge

    I did as you suggested, But still has same problem. Here is htaccess code

    http://pastebin.com/Knu0z88v

    and

    gtmetrix report

    http://gtmetrix.com/reports/www.onepriceindia.co.in/mIE6jwJI

  6. tgeorge
    Member
    Posted 3 years ago #

    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.

  7. vamban
    Member
    Posted 3 years ago #

    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 http://www.onepriceindia.com

    But WordPress installed in http://www.onepriceindia.co.in

    Is the problem due to image hosted in another domain name?

  8. vamban
    Member
    Posted 3 years ago #

    Hello Frederick Townes

    I am keenly awaiting for you valuable suggestion to get rid of this issue.

    Hope you might reply soon.

  9. tgeorge
    Member
    Posted 3 years ago #

    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.

  10. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  11. vamban
    Member
    Posted 3 years ago #

    Hello Frederick Townes

    Thanks for your reply.

    1.I have deployed the settings. Please check the .htaccess file here http://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 http://www.onepriceindia.co.in
    Image files (CDN) located in http://a.onepriceindia.com and http://m.onepriceindia.com

    Does this a reason why i am getting leverage browser cache warnings?
    Please help me to get rid of leverage browser caching issue.

  12. vamban
    Member
    Posted 3 years ago #

    Hello Frederick Townes

    I am seriously needed ur kind help.

    Help me to resolve the above issue.

  13. vamban
    Member
    Posted 3 years ago #

    Hello Frederick Townes

    I thought the issue may be images which is hosted in another domain http://m.onepriceindia.com other than where the wordpress which is installed

    Even i tried to change the CDN domain from http://m.onepriceindia.com to the same wordpress domain as http://cdn.onepriceindia.co.in

    Still its gtmetrix warns the leverage browser cache issue still exists.
    here is the gtmetrix analysis page which done on
    http://gtmetrix.com/reports/www.onepriceindia.co.in/g7oe9HLg

    Even after i deployed all the settings. Here is .htaccess file how does it appears in my host. http://pastebin.com/QGnJ8LmZ

    As well as here is the screenshot of my plugin settings page. http://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.

  14. vamban
    Member
    Posted 3 years ago #

    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.

    http://cutfromthenorth.com/set-far-future-expires-headers-with-rackspace-cloud-files/

    http://blog.html-color-codes.info/2011/06/how-to-set-far-future-expire-headers-on-rackspace-cdn/

    http://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
    Selvam

  15. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Can you please submit a bug submission form from the support tab of the plugin?

  16. vamban
    Member
    Posted 3 years ago #

    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

  17. vamban
    Member
    Posted 3 years ago #

    Hello Frederick Townes

    Hope you might received via bug submission form.

    :)

  18. vamban
    Member
    Posted 3 years ago #

    Hello Frederick Townes

    Did you found any solutions?

    Expecting your kind co-operation

    With regards
    Selvam.S

  19. Nasul
    Member
    Posted 3 years ago #

    Have the latest plugin version (and no cdn) and I have the same problems on my site http://nasul.net/ in pagespeed and gtmetrix. :(

    The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

    connect.facebook.net/en_US/all.js (12.9 minutes)
    cdn.api.twitter.com/.../count.json?... (15 minutes)
    platform.twitter.com/widgets.js (30 minutes)
    apis.google.com/js/plusone.js (60 minutes)
    google-analytics.com/ga.js (2 hours)
    nasul.net/.../bg-main-l.jpg (24 hours)
    nasul.net/.../bg-main-r.jpg (24 hours)
    nasul.net/.../bg-nav.png (24 hours)
    nasul.net/.../grey.gif (24 hours)
    nasul.net/.../header.jpg (24 hours)
    nasul.net/.../icons.png (24 hours)
    nasul.net/.../nav-div.png (24 hours)
    nasul.net/.../stars24.gif (24 hours)
    nasul.net/.../submit-bg.gif (24 hours)
    nasul.net/.../Eco-Time-Indesit-IWC-6125-A-1-183x200... (24 hours)
    nasul.net/.../Eco-Time-Indesit-IWC-6125-A-2-200x118... (24 hours)
    nasul.net/.../Eco-Time-Indesit-IWE-6105-64x64.jpg (24 hours)
    nasul.net/.../Indesit-IWD-5125-1-64x64.jpg (24 hours)
    nasul.net/.../default.include-footer.f3db22.js (24 hours)
    nasul.net/.../default.include.35b16b.css (24 hours)

  20. Bike
    Member
    Posted 3 years ago #

    Same here:
    - Latest version of plugin
    - All expiry times set (and they are in htaccess)
    - No CDN, just my own VPS server

    See https://developers.google.com/pagespeed/#url=http_3A_2F_2Fflexiwaysolar.com_2F&mobile=false&rule=LeverageBrowserCaching

    for results, most png's but also js and jpg and others have no expiry time.
    Interestingly enough when testing on gtmetrix then PageSpeed gives much better results. So is the Google measurement wrong (blasphemy!) or are no expiry times set?

    Cheers, Harry

  21. BackY
    Member
    Posted 3 years ago #

    Anything on how to fix this !?

  22. t0mmyZ
    Member
    Posted 3 years ago #

    Hi same problem here, not sure how to use any of the solutions in the links posted by vamban. Hosting with Rackspace CloudFiles.

    would really appreciate a fix for this matter as well, thanks for helping us optimize!

  23. cyonite
    Member
    Posted 2 years ago #

    If you are sure all your modules are enabled and functioning.
    You could try the development version as well: http://wordpress.org/extend/plugins/w3-total-cache/download/
    Just backup your files as usual.
    Still problem send a bug submission form from the Support tab in the plugin.

    t0mmyZ:
    When it comes to CF API there is no support for that. You'll have too write own code to set that up.

  24. Bybe
    Member
    Posted 2 years ago #

    t0mmyZ:
    Hi same problem here, not sure how to use any of the solutions in the links posted by vamban. Hosting with Rackspace CloudFiles.

    would really appreciate a fix for this matter as well, thanks for helping us optimize!

    Rather than using the W3 plugin you can use SSH to set your rackspace cloud TTL's and Expires, this will speed up your wordpress site loads, check out

    http://www.bybe.net/blog/how-to-fix-rackspace-file-cloud-leverage-browser-caching-via-api-ssh.html

  25. rohitmanglik
    Member
    Posted 2 years ago #

    Does your issue is resolved?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic