CloudFlare gets a lot of questions about caching and our free CDN (content delivery network), so I thought I would put together a really quick guide about what CloudFlare caches and more.
Why should I cache my static content at all?
Distributing your static content with CloudFlare's CDN will lead to faster page loading times for your visitors. As visitors are more inclined to bounce away from a slow loading site, you will reduce your bounce rate and increase the amount of time that people spend on your site. Or, in other words, a faster a website means your visitors will stay longer.
Do I need to do anything special to have CloudFlare cache my content?
No. Unlike many other traditional CDNs, CloudFlare is zero configuration. What this means is that there is no configuration once you sign up for CloudFlare. CloudFlare's technology will automatically cache the static content based on file extensions.
I already use a CDN. Can I still use CloudFlare?
Absolutely. There are two setup options.
If you want to use both CloudFlare and your current CDN, in your CloudFlare DNS Settings page, you want to make sure that the CNAME for the CDN subdomain is listed and that the cloud is orange. This means that the traffic passes through CloudFlare first, before hitting your other CDN. As a result, your bill for your other CDN provider should decrease.
If you don't want to use CloudFlare on the same subdomains as your other CDN, you can turn CloudFlare 'off' for those subdomains by marking the cloud as gray. This means that none of the traffic to those subdomains will pass through CloudFlare's network.
To access your CloudFlare DNS Settings page:
My Websites->Settings->DNS settings
Will CloudFlare conflict with any of my WordPress caching plugins?
CloudFlare is a complementary offering to popular WordPress caching plugins. Where as most WordPress caching plugins focus on optimizing your database and server, CloudFlare optimizes at the network level. CloudFlare has partnered with the popular W3 Total Cache plugin and is included as an option in W3 Total
On the topic of WordPress, CloudFlare has a WordPress plugin as well. This ensures that WordPress users get the most out of the service. Note: If you activate CloudFlare through W3TC, then you do not need to use the CloudFlare WordPress plugin as well.
What kind of static content does CloudFlare cache?
Does CloudFlare cache dynamic content, such as HTML or PHP?
CloudFlare does not currently cache these content types.
Will caching my static content affect dynamic updates to mysite?
No, dynamic updates to your site will still occur as they do now. CloudFlare is fully compatible.
I need to update my static content that CloudFlare is caching. What do I do?
If you plan on changing the static content on your site, like an image, we recommend going to Development Mode on your CloudFlare Settings page. Development Mode will bypass CloudFlare's cache and so any change that you make will be immediately live around the world. Development Mode is turned on and off with one click.
If you forget to enable Development Mode before making the change, you can simply purge your CloudFlare cache.
It takes less than one minute to purge your cache and by doing this, your new resources will automatically be live around the world.
If you don't want to purge your CloudFlare cache, then CloudFlare's cache will automatically expire after two to four hours.
Directions for getting to your Development Mode and Purge Cache settings: My websites->Settings->CloudFlare Settings.
How can CloudFlare offer a Free CDN?
CloudFlare believes that all websites should be fast. Because of CloudFlare's technology, we've been able to build a CDN that is available to any website online. From the beginning, we worked to minimize the costs of serving every byte. Wherever possible, we use our own custom-built systems that are designed for this purpose. We buy our bandwidth through the wholesale market, which means we're paying for the size of our pipe, not for each byte we serve through it. We also peer with other networks wherever possible in order to drive the cost of bandwidth as close to zero as possible. In addition to a Free service, CloudFlare offers additional paid plans and services.
Sign up today to get all of the benefits of CloudFlare's free CDN.