Support » Plugin: WebP Express » Leverage browser caching

  • Resolved sergeyua12

    (@sergeyua12)


    Hello,
    I use W3 Total Cache for caching.
    PageSpeed Insights and GTmetrix warns that the Leverage browser caching:
    *.jpg.webp (expiration not specified).
    What can you advise?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author rosell.dk

    (@roselldk)

    Have you set the caching in WebP Express settings > General > Cache-Control header ?

    sergeyua12

    (@sergeyua12)

    Yes – Custom, but 2 days ago.
    But, Conversion files without this setting.

    Plugin Author rosell.dk

    (@roselldk)

    Ah, I see that you are on Nginx.
    You will have to add rules manually to your nginx config.
    Check out the “I am on Nginx” section in the faq

    You will need something like this:
    (this sets expiry to 365 days, you might want to start lower)

    
    location ~* ^/wp-content/.*\.(png|jpe?g|webp)$ {
        expires 365d;
    }
    
    • This reply was modified 8 months ago by rosell.dk.
    sergeyua12

    (@sergeyua12)

    Unfortunately, I can not make changes on a shared hosting …
    Can I add this rule through a .htaccess file?

    Plugin Author rosell.dk

    (@roselldk)

    Unless there is some magick on the server, .htaccess files will not be working.
    This also means that the redirects in the Varied Image Responses mode probably does not have any effect. You should use “CDN friendly” mode.

    With regards to caching, perhaps you host supports setting this through a control panel? If you have no control what-so-ever and the host cannot help you with a simple thing as setting cache-control, consider changing host 🙂

    sergeyua12

    (@sergeyua12)

    rosell.dk Thank you for your attention and efficiency!

    I was offered on a hosting to remove the end of “webp” from the section “Statistical files”.

    And lo and behold – all PageSpeed Insights, GTmetrix and WebPageTest do not complain !!!

    Thanks for the plugin!

    Plugin Author rosell.dk

    (@roselldk)

    Great, and thanks 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Leverage browser caching’ is closed to new replies.