Ultra Web Hosting Docs

Caching & Performance

Cloudflare speeds up your website by caching static content at edge servers around the world. When a visitor requests your site, Cloudflare serves cached files from the nearest data center instead of fetching them from your hosting server every time, reducing load times and saving server resources.

How Cloudflare Caching Works

Cloudflare operates a global network of data centers (edge servers). When someone visits your site for the first time, Cloudflare fetches the content from your Ultra Web Hosting server (the origin) and stores a copy at the edge. Subsequent visitors in the same region receive the cached copy directly from Cloudflare, which is significantly faster because the data travels a shorter distance.

What Gets Cached by Default

Cloudflare automatically caches static file types based on their extension. These include:

What Does NOT Get Cached

By default, Cloudflare does not cache:

This means your dynamic WordPress pages, login forms, and shopping carts will always be served fresh from the server, while your images, CSS, and JS files benefit from Cloudflare's edge caching.

Browser Cache TTL

The Browser Cache TTL (Time to Live) setting controls how long a visitor's browser keeps cached files before requesting a fresh copy from Cloudflare. You can configure this in your Cloudflare dashboard.

  1. Log into your Cloudflare dashboard.
  2. Select your domain.
  3. Go to CachingConfiguration.
  4. Find Browser Cache TTL and choose a duration.

A longer TTL (e.g., 1 month) means returning visitors load your site faster because their browser reuses cached files. A shorter TTL means visitors get updated content sooner. For most sites, the default setting of 4 hours or Respect Existing Headers works well.

Caching Level Options

Cloudflare offers three caching levels that determine how URLs with query strings are handled:

The Standard setting is the best choice for most websites, especially WordPress sites that use query strings for cache-busting when you update themes or plugins.

Purging the Cache

When you update your website (new images, updated CSS, etc.), Cloudflare may still serve the old cached version until it expires. You can force Cloudflare to fetch fresh content by purging the cache.

Purge Everything

  1. In your Cloudflare dashboard, go to CachingConfiguration.
  2. Click Purge Everything.
  3. Confirm the action.

This clears all cached files across all Cloudflare data centers. Your site may load slightly slower for the first few visitors afterward as caches are rebuilt.

Purge by URL

If you only changed a specific file (for example, a single image or stylesheet), you can purge just that file instead of clearing the entire cache:

  1. In your Cloudflare dashboard, go to CachingConfiguration.
  2. Click Custom Purge.
  3. Enter the full URL of the file you want to purge (e.g., https://yourdomain.com/images/logo.png).
  4. Click Purge.
Warning Always purge the Cloudflare cache after deploying updates to your website. If you update CSS or JavaScript files without purging, visitors may see a broken layout because their browser loads the new HTML but Cloudflare serves the old cached CSS/JS files.

Auto Minify

Auto Minify removes unnecessary whitespace and comments from your CSS, JavaScript, and HTML files, reducing their size and improving load times. This happens on-the-fly at Cloudflare's edge without modifying your original files.

  1. In your Cloudflare dashboard, go to SpeedOptimization.
  2. Under Auto Minify, enable the toggle for JavaScript, CSS, and/or HTML.
Tip If you are already minifying files through a WordPress plugin like LiteSpeed Cache or Autoptimize, you do not need to enable Cloudflare's Auto Minify for those same file types. Double-minification rarely causes issues, but it adds no benefit.

Rocket Loader

Rocket Loader defers the loading of all JavaScript on your page until after the page content has rendered. This can significantly improve the perceived load time because visitors see your content before scripts finish loading.

  1. In your Cloudflare dashboard, go to SpeedOptimization.
  2. Toggle Rocket Loader on.
Note Rocket Loader can occasionally cause issues with scripts that need to run immediately (e.g., analytics tracking, inline scripts that manipulate the DOM on load). If you notice broken functionality after enabling it, try disabling Rocket Loader and testing again.

Polish (Image Optimization)

Polish is a Cloudflare Pro feature that automatically optimizes images served through Cloudflare. It offers two modes:

Polish can also serve images in WebP format to browsers that support it, which is typically 25-30% smaller than JPEG or PNG.

Note Polish requires a Cloudflare Pro plan or higher. On the free plan, you can achieve similar results using image optimization in the LiteSpeed Cache WordPress plugin or by optimizing images before uploading.

Cloudflare Caching with LiteSpeed Cache

Your Ultra Web Hosting account runs on LiteSpeed Web Server, which includes its own powerful server-side caching. When you use Cloudflare together with LiteSpeed Cache, they work as two layers of caching that complement each other:

Together, LiteSpeed Cache eliminates the PHP processing overhead on the server, and Cloudflare reduces the distance static files travel to reach your visitors. This is the ideal setup for fast page loads.

Best Setup for WordPress

  1. Install the LiteSpeed Cache plugin in WordPress (it is pre-installed on most Ultra Web Hosting accounts).
  2. Enable page caching in the LiteSpeed Cache plugin settings under CacheCache → set Enable Cache to On.
  3. In the LiteSpeed Cache plugin, go to CDN → enable Cloudflare API and enter your Cloudflare API credentials. This allows the plugin to automatically purge the Cloudflare cache when you update content in WordPress.
  4. In Cloudflare, keep the caching level set to Standard and avoid enabling page rules that cache HTML unless you know what you are doing.
Tip The LiteSpeed Cache plugin's Cloudflare integration is the easiest way to keep both caches in sync. When you publish or update a post, the plugin purges the relevant pages from both the LiteSpeed Cache on the server and the Cloudflare edge cache automatically.

Checking if Content is Cached

You can verify whether Cloudflare is serving cached content by checking the CF-Cache-Status header in the HTTP response. Open your browser's developer tools (press F12), go to the Network tab, reload the page, and click on a static resource like an image or CSS file. Look for the CF-Cache-Status header in the response headers:

You can also check from the command line:

curl -I https://yourdomain.com/image.jpg

Look for the cf-cache-status line in the output.