• Hello,

    I’m following your steps on the FAQ page to set-up the plugin to work with Cloudflare.

    Do I follow the steps even though I’m caching my entire website?

    I have set the following rules in Cloudflare…

    website.com/*
    Always Online: On, Cache Level: Cache Everything, Edge Cache TTL: a month

    Do those steps also apply to me?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @nomadandinlove – you should not use WebP Express if you are going to cache everything on edge servers.

    Let’s suppose that you are using CDN Friendly mode, which basically alters the HTML output based on visitor’s browser string (UA), now think what would happen if the first visitor that comes to the page uses a browser that supports WebP. Well, plugin will work and it will alter HTML to use WebP, but now Cloudflare will cache that modified content on their servers. So, now if someone access the website with a browser that does not support WebP, they will still get WebP images because that request never makes to the server.

    The only scenario where you can get this setup working is if you use HTTP vary-headers but you will need to upgrade your Cloudflare account.

    SamTyurenkov

    (@samtyurenkov)

    @ashucg You are not exactly correct.

    I managed to setup caching, CDN and alter HTML with “append webp” instead of replace or vary response.

    CDN will cache both jpg and webp version.

    However, this requires some custom code in template files for images obtained with ajax, some nginx rules implemented.

    @samtyurenkov – alter HTML is not always an option for all websites, that’s why it is an option and not the default behavior ??

    Thread Starter nomadandinlove

    (@nomadandinlove)

    @ashucg So if I upgrade my Cloudflare account, I may as well use Cloudflare to serve WebP.

    Thread Starter nomadandinlove

    (@nomadandinlove)

    @samtyurenkov Do you have any resources I can follow to implement this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cloudflare and Cache Everything’ is closed to new replies.