One of Rocket.net’s first innovations was our delivery network. By using a performant CDN, we bring your website the Edge, where it’s closest to your website's visitors. This is done by caching static assets (html, js, css, images) in the CDN’s cache until that cache expires or when your WordPress site tells the CDN to purge the cache.
This FAQ will help you understand better how the CDN caching works and how to determine if any trouble that your site is experiencing may be related to the CDN or not.
What can and cannot be cached?
First, let’s define what a static asset is. A static asset is an element of your WordPress site that everyone who visits your site sees: HTML, CSS, and JavaScript.
Static assets are the same for every visitor, and so they can be cached. Dynamic content that changes for each user cannot be cached.
Does the CDN Cache modify my content?
No. The CDN, whether it be Cloudflare Enterprise or another provider that Rocket.net uses in the future, will never modify your content. HTML, CSS, and JavaScript.
If you are seeing issues with HTML, CSS, or JavaScript not working properly, and you’ve cleared the caches, you can be sure that this is not a CDN issue but instead may be an issue with a caching plugin.
What Is Cached and Where?
The CDN has over 280 POPs (Points of Presence) around the globe. This network of POPs each has its own cache. Each location can share its cache with other locations for added speed. But, if the requested data is not cached at all, then it is retrieved from the origin: Rocket.net’s server.
The only cached assets are:
- HTML
- CSS
- JavaScript
- Images
How Does The CDN Know When To Purge Its Cache?
Whenever WordPress issues a cache flush, the CDN Cache mu-plugin that Rocket.net installs on your site will issue an API call to the CDN to clear the cache of all pages.
You can clear the cache manually from the CDN Cache link at the top of the WordPress Dashboard or from the Rocket.net Dashboard. The following KB article goes into greater detail:
Manually Clearing the CDN Cache
Do Images Get Modified By The CDN?
Unless an image is being optimized by Cloudflare Polish, it’s unmodified. And, even if an image is converted to webp, this is only reflected in the HTTP headers. File name and the HTML that loads it are still unmodified.
You can learn more about Cloudflare Polish and the image optimization it does here:
Do I Need To Use An Image Optimization Plugin or CDN with Rocket.net?
Common non-CDN issues
- Pages not updating
- CSS not updating
- Blank page opening on some pages.
Not related with the CDN cache, even if purging the CDN cache fixes it for a while. It is usually caused by a invalid cache from caching plugins such as WP-Rocket. These can be also caused by the theme optimization settings.
In some cases, a caching plugin will not properly purge its cache. To test this, rename the wp-content/cache folder to wp-content/cache1 or some other name, and then clear the cache in your caching plugin one more time. You should see a new cache folder, and you can then remove the renamed cache folder, and the content should show correctly. If not, try an Incognito/Private browser, or use another browser or even a different device to test.
Do You Have More Questions?
If you have any other questions, please do not hesitate to reach out to our support team. We’ll be glad to help you however we can.
Comments
0 comments
Article is closed for comments.