Title: Cloudflare and Cache Everything
Last modified: October 23, 2020

---

# Cloudflare and Cache Everything

 *  [nomadandinlove](https://wordpress.org/support/users/nomadandinlove/)
 * (@nomadandinlove)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/)
 * Hello,
 * I’m following your steps on the [FAQ page](https://wordpress.org/plugins/webp-express/#%0Ai%20am%20on%20cloudflare%0A)
   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)

 *  [Ashutosh Sharma](https://wordpress.org/support/users/ashucg/)
 * (@ashucg)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/#post-13604544)
 * Hi [@nomadandinlove](https://wordpress.org/support/users/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](https://wordpress.org/support/users/samtyurenkov/)
 * (@samtyurenkov)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/#post-13604641)
 * [@ashucg](https://wordpress.org/support/users/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.
 *  [Ashutosh Sharma](https://wordpress.org/support/users/ashucg/)
 * (@ashucg)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/#post-13613623)
 * [@samtyurenkov](https://wordpress.org/support/users/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](https://wordpress.org/support/users/nomadandinlove/)
 * (@nomadandinlove)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/#post-13629539)
 * [@ashucg](https://wordpress.org/support/users/ashucg/) So if I upgrade my Cloudflare
   account, I may as well use Cloudflare to serve WebP.
 *  Thread Starter [nomadandinlove](https://wordpress.org/support/users/nomadandinlove/)
 * (@nomadandinlove)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/#post-13629542)
 * [@samtyurenkov](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/webp-express/assets/icon.svg?rev=1918288)
 * [WebP Express](https://wordpress.org/plugins/webp-express/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webp-express/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webp-express/)
 * [Active Topics](https://wordpress.org/support/plugin/webp-express/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webp-express/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webp-express/reviews/)

## Tags

 * [cache everything](https://wordpress.org/support/topic-tag/cache-everything/)
 * [cdn](https://wordpress.org/support/topic-tag/cdn/)

 * 5 replies
 * 3 participants
 * Last reply from: [nomadandinlove](https://wordpress.org/support/users/nomadandinlove/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/cloudflare-and-cache-everything/#post-13629542)
 * Status: not resolved