Title: Cloudflare compatibility
Last modified: September 2, 2019

---

# Cloudflare compatibility

 *  Resolved [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/)
 * Hello,
    I have just installed and set up a group that contains two adverts. The
   group is set up to use “Default” mode as I want one ad shown at any time on any
   page and don’t want timed ad swapping. However when I visit my site, only one
   of those ads is ever shown. I assume this is due to the fact that I’m using Cloudflare
   with my site and therefore the initial output HTML is cached and AdRotate is 
   reliant on PHP for ad generation/output? Is there a way that I can have the ad
   dynamically generated for the site via JS as opposed to relying on PHP for the
   ad generation?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/#post-11894653)
 * As far as I’m aware Cloudflare only caches static assets such as images and javascript.
   Which works fine next to AdRotate.
 *  Thread Starter [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/#post-11894739)
 * Hi [@adegans](https://wordpress.org/support/users/adegans/) – thanks for the 
   response. Cloudflare can also fulfil full page caching as well (I’m currently
   set up to use that). It’s not _default_ but it can/does do it (in a similar vein
   to W3TC – but without the option for fragment caching). Essentially, whatever
   is loaded in HTML on the first page load = what is delivered to consecutive visitors.
   
   For the time being, I’ve implemented a really simple piece of javascript with
   two ads that are not served via any plugin. This JS is called on page load and
   randomises the order of the ads shown without the reliance on PHP.
 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/#post-11898962)
 * As you already noted, AdRotate outputs via PHP and requires fragmented caching
   to get through caches.
 * AdRotate has support for W3 Total Cache and Borlabs Cache.
    Check out this manual
   on making the plugins work together; [https://ajdg.solutions/support/adrotate-manuals/caching-support/](https://ajdg.solutions/support/adrotate-manuals/caching-support/)
 *  Thread Starter [Will Stocks](https://wordpress.org/support/users/willstockstech/)
 * (@willstockstech)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/#post-11898978)
 * Ahhh, OK – if it’s PHP only then unfortunately it won’t work for me as I’m not
   actually using W3TC for page caching, but I’m using Cloudflare. Once the HTML
   is generated and output, that’s it until the cache is fully busted ([https://support.cloudflare.com/hc/en-us/articles/200172256-How-do-I-cache-static-HTML-](https://support.cloudflare.com/hc/en-us/articles/200172256-How-do-I-cache-static-HTML-)).
   
   I’ve worked around this for the time being by building a simple javascript “rotater”(
   fits my basic use-case currently, but obviously is limited in advanced functionality).
   Do you think this is something that might be supported in the future (“dynamically”
   rotating ads via JS) or is that out-of-scope?
 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/#post-11920255)
 * Sure, once I figure out a reliable and fast way to do so.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cloudflare compatibility’ is closed to new replies.

 * ![](https://ps.w.org/adrotate/assets/icon-256x256.gif?rev=3117289)
 * [AdRotate Banner Manager](https://wordpress.org/plugins/adrotate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adrotate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adrotate/)
 * [Active Topics](https://wordpress.org/support/plugin/adrotate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adrotate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adrotate/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)

 * 5 replies
 * 2 participants
 * Last reply from: [Arnan](https://wordpress.org/support/users/adegans/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/cloudflare-compatibility-3/#post-11920255)
 * Status: resolved