WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
AdRotate solution (5 posts)

  1. aljuk
    Member
    Posted 2 years ago #

    I'm posting this for the benefit of anyone, like me, who runs into problems using page caching with w3tc and an ad banner randomiser like AdRotate.

    I tried all the solutions mooted on previous forum posts, like fragmented caching (wrapping the call to AdRotate in special tags to exclude it from caching) but none of it worked for me - the ads were always cached.

    This, however, works, and is oh so simple.

    Simply remove the call to AdRotate (e.g. <?php echo adrotate_block(1) ?>) from your template file, place it into its own (new) file, and call it into the template via a php include instead. Then add this new file to the 'Never cache the following pages:' list in w3tc. Clear all caches and you should be good to go.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. shansta
    Member
    Posted 2 years ago #

    Hey, I have tried this... Seems to work well with adsense but still caching other advertisers when using <img> tags :/

  3. aljuk
    Member
    Posted 2 years ago #

    Ah, tbh I'm only serving ads locally at this point, off my own server (the output of which is randomising fine), so have no experience of that at this time. But I'd have thought it should be fine since the same principle should apply (ie. that the scripts are running live and not cached). Hmm, perhaps my theory has a flaw.

  4. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    It's best to deliver them with openx or any other javascript based delivery system.

  5. lin
    Member
    Posted 1 year ago #

    Hello folks. I had the same problem with W3 Total Cache and AdRotate. I wrote a blog entry on my blog with the solution: "How To use the Banner-Plugin AdRotate together with W3 Total Cache's Page-Cache (W3TC)"

    http://www.pixelbar.be/blog/how-to-use-the-banner-plugin-adrotate-together-with-w3-total-caches-page-cache-w3tc/

    Greetz!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic