• Resolved Will Stocks

    (@willstockstech)


    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 de Gans

    (@adegans)

    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

    (@willstockstech)

    Hi @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 de Gans

    (@adegans)

    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/

    Thread Starter Will Stocks

    (@willstockstech)

    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-).
    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 de Gans

    (@adegans)

    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.