Skip to content
OptiWave | Doc
OptiWave · CDN & Cloudflare
Back to Website
Home / CDN & Cloudflare
Infrastructure

CDN & Cloudflare

Connect a custom CDN or Cloudflare, choose what to cache, and refresh the right cache when content changes.

Reviewed

Choose the delivery setup you use

Open OptiWave → CDN. CDN integration is disabled by default. A custom CDN serves selected static assets from another hostname. Cloudflare can also cache eligible HTML at its edge when configured.

Connect a custom CDN

  1. Select Custom CDN and enter your HTTPS address in CDN CNAME, such as https://cdn.example.com.
  2. Choose All Assets, CSS, JS & Fonts, or Images Only.
  3. Enable Add Preconnect Link if early connections to that CDN are useful for your pages.
  4. Wait for the save confirmation, refresh the cache, and confirm rewritten files return successfully. Check font cross-origin support with your CDN provider.

Connect Cloudflare

Select Cloudflare. Enter the Zone ID and an API Token for the relevant site. Leave Account Email blank for an API Token; it is needed for a legacy Global API Key.

The current connection screen lists the required token permissions: Zone Read, Cache Purge Edit, Cache Rules Edit, Zone Settings Edit, Account Rulesets Edit, and Account Filter Lists Edit. Use a token scoped to your account and zone, then test the connection before enabling features.

Edge Caching (Rulesets) applies OptiWave's public-page cache rules. Keep login, checkout, personal pages, and session cookies excluded. Review other Cloudflare rules that may overlap with them.

Refresh the correct cache

The CDN screen's Cloudflare purge action targets the current WordPress hostname. It does not clear the local OptiWave cache or start a new preload. It is available with a valid connection even when Edge Caching is off.

To rebuild local pages too, use Purge & Preload All on the Dashboard. Use Start Preloading when you want to prepare pages while keeping existing caches.

Development Mode and Instant Navigation

Development Mode temporarily bypasses Cloudflare caching while you inspect changes. Local OptiWave caching remains a separate layer; a local refresh may still be needed.

OptiWave keeps Speed Brain disabled when its Instant Navigation feature is enabled. Choose one owner for speculative navigation.

Check edge delivery

After a public page is prepared and requested, inspect CF-Cache-Status, Age, and X-OptiWave-Cache in the browser Network panel. A Cloudflare HIT and an OptiWave HIT describe different cache layers.

If you see old content, check which layer returned it before purging again. Confirm the connection, active rules, and page exclusions when a public page repeatedly bypasses the edge.

See the cdn & cloudflare screen
OptiWave CDN tab showing custom CDN URL and Cloudflare integration settings
CDN & Cloudflare screen reference. Labels may differ in your installed release.