1 Introduction
The article I originally planned to write this week was not this one, but while researching “the impact of APO on WordPress content caching,” I accidentally discovered an abnormal situation: the response header of the request to access the blog showed “Cf-Cache-Status: BYPASS“:

Most importantly, no matter how I refreshed, it was always ”BYPASS”, which means APO was in an inactive state for my blog access requests (I don't know the actual scope of the issue, only that it was at least the case for my access requests). This made me very unhappy. After all, I am now a noble Cloudflare Pro user, and the APO feature is an expensive service sold separately for $5 a month. How could it not work? This must be taken seriously!
To figure out the reason behind this, I had to adjust my direction midway, study this phenomenon deeply, and try to find the triggering factors of the issue.
2 Analysis of Regular Response Header Content of WordPress Sites After Enabling APO
Under normal circumstances, when using APO, the response headers should look similar to the following:
Cache-Control: max-age=14400, must-revalidate
Cf-Apo-Via: tcache
Cf-Cache-Status: HIT
Cf-Edge-Cache: cache,platform=wordpress
However, the situation I encountered wasCf-Cache-Status:BYPASS, meaning the cache was bypassed, and the reason was due to an unconventional cookie, so testing was needed to find out exactly which cookie caused this situation.
Under normal circumstances, after enabling APO, when a visitor's browser accesses a WordPress site, the received response headers should contain the following key fields:Cache-Control、cf-apo-via、cf-cache-status、cf-edge-cache, and the specific meanings of these fields are as follows:
Cache-Control: Defines the cache policy, specifying the storage duration of the content and whether revalidation is required. Common values include:
• max-age=xxxxx: Indicates that the cache is valid for xxxxx seconds.
• must-revalidate: Requires revalidating the validity of the content after expiration, usually used in conjunction with max-age.
• no-cache: Indicates that the cache can store the response, butmust revalidate with the origin server before each use(i.e., performing ETag or Last-Modified header checks). This ensures that the cached content is always up-to-date while still reducing the number of full downloads.
• no-store: Indicates thatstoring response data is absolutely not allowed, meaning neither browser cache, CDN, nor proxy servers can save the content, and every request will fetch the complete resource anew. This value is typically used for sensitive data (such as login pages, banking transactions, etc.).
Cf-Apo-Via: Indicates the data source of Cloudflare APO. Common values include:
• tcache: Indicates that APO serves content from the Cloudflare edge cache, which is a normal cache hit state.
• origin,cookie: Indicates that the browser request bypassed the APO cache and went directly back to the origin to fetch content because it carriedan unconventional Cookie , which usually happens when a user logs in, a specific plugin sets a Cookie, or certain custom rules are triggered.
• origin,no-cache: Indicates that the request bypassed the APO cache and went directly back to the origin to fetch content due to the presence of the Cache-Control: no-cache header. This means Cloudflare allows caching the page but must revalidate the latest state of the origin server (e.g., checking ETag or Last-Modified) before serving the cached content. If the origin response has not changed, Cloudflare may still return the cached content, but it will add an extra request back to the origin.
Cf-Cache-Status: Indicates the Cloudflare cache status. Possible values include:
• HIT: Cache hit, content comes from the cache of Cloudflare edge nodes.
• MISS: Cache miss, requires fetching from the origin.
• BYPASS: Cloudflare goes directly to the origin due to certain rules (such as Cookies or specific response headers).
• EXPIRED: Cache has expired, needs to be refetched and updated.
Cf-Edge-Cache: Indicates the APO cache policy on the WordPress site, usually “cache,platform=wordpress”, meaning Cloudflare has optimized caching for the WordPress site.
3 Problem Reproduction
1 Simulating the First Time Opening the Homepage
After I cleared all browsing history and cookie information in the Chrome browser, I opened the blog homepage for the first time:

At this time, the access is normal, the status of ”CF-Cache-Status” is ”HIT”, and the cookies (first-party) generated by my blog at this moment are as follows (there are 6 cookies, mainly the bottom 3):

This is the cookie state when the APO cache is working normally, let's mark it first.
Since it is confirmed that the first visit to the homepage is fine, let's proceed to the next test: reload (because the situation I encountered was that no matter how many times I reloaded, it was always BYPASS, so I can't help but suspect it is related to reloading).
2 Reloading Test
2.1 Introduction to Types of Reloading
The 3 different loading methods provided by the Chrome browser have different cache processing logic for each method:

- Normal Reload
• Trigger Method: Press F5 or click the refresh button
• Cache Behavior: The browser will send a request to the server to check if the cache is still valid (via response headers like ETag, Last-Modified); if the server returns 304 Not Modified, it continues to use the cached data; only certain resources (such as HTML files) might be re-fetched, while other resources (such as CSS, JS, images, etc.) may still be loaded from the cache.
- Hard Reload
• Trigger Method: Press Ctrl + Shift + R (Windows/Linux) or Cmd + Shift + R (Mac)
• Cache Behavior: Forces re-downloading of all resources (HTML, CSS, JS, images, etc.) from the server, but Service Worker may still intercept requests, serving data from the cache.
- Empty Cache and Hard Reload
• Trigger Method: Open Developer Tools (F12 / Ctrl + Shift + I) → Right-click the refresh button → Select “Empty Cache and Hard Reload”
• Cache Behavior: Clears all caches (including HTTP cache, stored Service Worker cache), forcing re-download of all resources from the server.
Summary is as follows:
| Loading Method | Whether to use cache | Whether to check if resources are updated | Whether to clear cache |
|---|---|---|---|
| Normal Reload | May use cache | Yes (via ETag, Last-Modified) | 否 |
| Hard Reload | Do not use cache | No, fetch directly from the server | 否 |
| Empty Cache and Hard Reload | Do not use cache | No, fetch directly from the server | 是 |
Practical Application Scenarios
• Normal Reload: Used under normal circumstances to reduce unnecessary resource downloads and improve page loading speed.
• Hard Reload: Suitable for situations where page updates are not timely, or certain resources (such as CSS, JS) seem not to have updated correctly.
• Empty Cache and Hard Reload: Suitable for troubleshooting cache issues, debugging web applications, or ensuring the latest resources are loaded (such as during frontend development or testing after a new deployment).
The second method ”Hard Reload” and the third method ”Empty Cache and Hard Reload” are generally similar, so this time we will only use the first and second reload methods.
Note: If the browser actively requests to bypass the cache (such as a hard refresh Ctrl + F5 or disabling cache in Developer Tools), it will usually carry “Cache-Control: no-cache” and ”pragma: no-cache” in the request headers to indicate a request for the server to revalidate or directly fetch the latest content. In this case, Cloudflare will also follow the browser's request, fetching data directly from the origin without using the APO cache. In Cloudflare's response headers, this origin-fetching behavior may be reflected in cf-apo-via: origin,no-cache, indicating that the request bypassed the APO cache due to the presence of the no-cache header.
2.2 Normal Reload and Hard Reload Testing
Normal Reload
First, verify using the ”Normal Reload” method. I tried normal reloading of the homepage many times, as well as multiple normal reloads after selecting a certain article, and there were no issues.
Hard Reload
Then verify using the ”Hard Reload” method. At this point, ”Cf-Cache-Status: BYPASS” appeared for the first time:

However, the appearance of “Cf-Cache-Status: BYPASS” at this time is normal, because as mentioned earlier,Hard Reload it is essentially the browser actively requesting to skip the cache and fetch the latest content directly from the origin server. This can be seen from the “Cache-Control: no-store, no-cache, must-revalidate” and “Cf-Apo-Via: origin,no-cache” in the response headers, indicating that Cloudflare followed the browser's request and did not use the APO cache.
However, what followed was abnormal. No matter how many times ”Normal Reload” was performed afterwards, ”Cf-Cache-Status” was always ”BYPASS”, and ”CF-Apo-Via” became ”origin,cookie”:

In other words, as long as a ”Hard Reload” is performed once, an unconventional cookie (or cookies) will appear. This unconventional cookie (or cookies) will persist and cause the APO cache to fail for any subsequent visits to any content on my blog, directly manifested as ”Cf-Cache-Status” always being ”BYPASS”.
2.3 Brief Analysis of the Cause of the Issue
As can be seen from the analysis in the previous section, several key parameters of the response headers have changed, clearly indicating that Cloudflare APO failed to hit the cache, but instead requested the page content directly from the origin server.
First, Cache-Control: no-store, no-cache, must-revalidate indicates that the origin server explicitly instructs the browser and Cloudflare not to cache the page, and every request must be revalidated or even fetched directly from the origin. Secondly, Cf-Apo-Via: origin,cookie further indicates that Cloudflare APO bypassed the cache because it detected a Cookie that affects caching, directly requesting the origin server. Finally, Cf-Cache-Status: BYPASS confirms this, as Cloudflare considers this requestineligible for caching, and therefore did not serve a cached version.
Overall, the main reason why the APO cache was bypassed isspecific Cookies, and these Cookies may be triggered by Hard Reload , or there may be other unconfirmed triggers. Therefore, the key point that really needs to be investigated is which operations cause these Cookies to be set, and how toavoid unnecessary Cookies from affecting the APO cache。
Now let's look at the Cookie situation again. There are 4 more, as shown in the blue box within the red box below:

Among these 4 extra Cookies, ”PHPSESSID” and ”argon_user_token” are present on all websites using WordPress and the Argon theme, so they can be directly ruled out. Of the remaining two, I immediately locked onto the ”wp-editormd-lang” Cookie. After all, the name doesn't look like a standard Cookie. Could this Cookie be the cause of ”Cf-Cache-Status: BYPASS”?
To avoid wrongly accusing a good Cookie, let's actually verify it, deleting the ”https://blog.tangwudi.com“wp-editormd-lang” Cookie from ”


Then, verify it by performing a ”Normal Reload”, and found that the APO cache is back to normal:

Now it is completely confirmed that the Cookie causing the ”Cf-Cache-Status: BYPASS” issue is ”wp-editormd-lang”.
1 Root Cause Analysis
Seeing this Cookie name, I found it familiar at the time, and it is also related to the Markdown editor. The only Markdown plugin installed on my WordPress site is WP Editor.md, so it is basically certain that it is setting this wp-editormd-lang Cookie.
Why does “WP Editor.md” set this Cookie?
Judging from the name, wp-editormd-lang may be used to store the Markdown editor'slanguage preferences, and its functions may include:
- Remembering the user's language settings: For example, the plugin may support different languages such as zh-CN (Chinese) and en (English), using a Cookie to record the last selection so that it is automatically applied on the next visit.
- Ensuring the editor UI renders correctly: Some UI components may rely on this Cookie to decide which language file to load.
- May involve AJAX interactions: If the plugin's Markdown preview or parsing function needs to be loaded via AJAX, it may carry this Cookie to ensure the server returns the correct language version.
And why does Cloudflare APO BYPASS the cache?
Cloudflare APO detects Cookies. If a request or response carries non-WordPress core Cookies, it may consider the page to beuser-specific dynamic content, thereby bypassing the cache and fetching the page directly from the origin. This is to prevent caching user A's page and then user B seeing the wrong content when visiting。
Since wp-editormd-lang is not a WordPress core Cookie, Cloudflare may by default assume that the page contains user-specific content and therefore does not cache it, resulting in APO BYPASS(just my guess, accuracy not guaranteed).
2 Resolving the Issue
There are basically two most direct ways to solve this problem:
- Do not useWP Editor.mdthis plugin: but it works quite well for me, and I don't want to switch to others because it's too much hassle, so I gave up on this option.
- LetWP Editor.mdThe plugin should not set this Cookie: getting the author to modify the plugin is definitely impossible, but we can find a way to let WordPress itself achieve this requirement.
Currently, the second method seems the most feasible. After some research, you can directly add the following code to functions.php and save it:
add_action('send_headers', function() {
if (!is_admin()) { // 仅在前台页面生效
foreach (headers_list() as header) {if (stripos(;
The purpose of this code is to intercept and remove the wp-editormd-lang Set-Cookie response header only on front-end pages, ensuring that this Cookie does not affect the Cloudflare APO cache, thereby avoiding the CF-Cache-Status: BYPASS issue. Since this code is executed in the send_headers hook, it takes effect before the HTTP headers are sent, immediately preventing the Cookie from being written to the browser without waiting for the user's next request. In addition, this method does not affect the plugin functions in the WordPress backend, ensuring that the editor can still be used normally, while maintaining a high cache hit rate for front-end pages, making it a solution that balances performance optimization and functional integrity.
Then try in sequence: ”Hard Reload”, after which the ”wp-editormd-lang” Cookie appears, and then ”Normal Reload”, and this ”wp-editormd-lang” Cookie disappears. Success! Friends who are interested in this result can visit my blog in their own browsers to verify.
Actually, I do not recommend directly modifying any WordPress theme files now, because after modifying them, you often forget about it after a while. Over time, the theme files get messed up, and you don't even know what you changed, let alone how troublesome it would be if you want to keep these functions when changing themes.
So if there is a function that requires modifying WordPress theme files to achieve some features, such as the function in this article, which method is the best? Actually, it can be done through WordPress'sCode SnippetsThis plugin, whose free version can run PHP and HTML code, allows you to manage all these functions that originally needed to be added to theme files through the plugin, which is very convenient for management:

Note: Later, I had another doubt: the Expires time of this ”wp-editormd-lang” Cookie is ”Session”, but why does it always exist? I don't know how many times I restarted the system in between, and the browser was completely closed I don't know how many times, yet this ”session” actually remained? This is unscientific. Unless a feature of the Chrome browser: ”Continue where you left off” or ”Restore last session” took effect in this scenario, then even if the browser is closed, the Session Cookie might be restored. So I made an attempt, first turning off the PHP code in the ”Code Snippets” plugin, and then turning off this feature of the Chrome browser: in ”Settings” - “On startup”, change the original ”continue browsing the last opened web page” to ”Open the New Tab page”:

Finally, after clearing all Cookies and running the previous test again, the result was that this ”wp-editormd-lang” Cookie was gone after opening a new tab or reopening the browser after completely closing it. It turns out there was nothing wrong with the Cookie itself, but the ”session restore” feature brought it back. This can be considered the browser's “pseudo” session persistence mechanismthat tricked me? However, this discovery is actually not very useful, because most browsers have this feature enabled now.
5 Afterword
Finally solved thisannoyingissue, otherwise the $5 for the APO subscription would have been wasted! But looking back, ordinary friends visiting my blog generally wouldn't ”Hard Reload” the page for no reason, so in all probability,I was the only one truly affected, and after all that effort, it turned out to be like a “one-man carnival”。
However, looking at it from another perspective, although this fix was only fora cache bypass issue that I accidentally triggered myself, after all, through layers of troubleshooting, I found the root cause that ”the Cookie of the WP Editor.md plugin affects the Cloudflare APO cache”. This not only solved the current APO cache BYPASS issue, but more importantly, made me realize: if certain plugin functions or AJAX requests also carry similar Cookies in the future, it might also cause Cloudflare to misjudge the page as dynamic content, thereby bypassing the APO cache, and in turn affectingthe access speed of more users。
Therefore, this troubleshooting not only optimized the site'sstability and loading speedbut also allowed me toanalyze and resolve APO cache anomaliesand accumulate practical experience. On the other hand, my understanding of Cache-Control and related response header parameters has also become more thorough: from a superficial understanding before to true mastery. Therefore, this experience can be considered an unexpected but highly rewarding practical learning course.
P.S.: I have to sigh again,“writing it down” is really too important. Before I planned to organize the troubleshooting process into an article, my thoughts were scattered, here and there, and the analysis of the issue was superficial. Many details were just vague feelings, and I could never get to the point. But once I started writing it down, I had to conduct asystematic reviewof the entire issue, which not only made my thoughts clearer but also helped me discover previously overlooked details, and even unexpectedly find a breakthrough in the process of writing. More importantly, this kind of writing is not just a record, but also a form ofdeep thinking and knowledge accumulation. Today, it seems like a specific issue was solved, but this process itself has formed a reusable troubleshooting approach. In the future, when encountering similar situations, I can find the direction faster and even help others avoid detours.
Therefore, writing it down is not just a review, but also a way to make progress.
Is the blogger's WordPress built on a home server?
Yes, all applications of the site cluster are deployed at home, and only the image hosting is deployed on R2, making it easy to switch between multiple sites.