WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Change the Leverage browser caching

[Resolved] Change the Leverage browser caching

  • 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?

Viewing 15 replies - 1 through 15 (of 24 total)
  • 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

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

    Don’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

    http://pastebin.com/Knu0z88v

    and

    gtmetrix report

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

    But WordPress installed in http://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.

    tgeorge

    @tgeorge

    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.

    Plugin Author Frederick Townes

    @fredericktownes

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

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

    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

    Plugin Author Frederick Townes

    @fredericktownes

    Can 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

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘[Resolved] Change the Leverage browser caching’ is closed to new replies.