Title: Works randomly
Last modified: August 22, 2016

---

# Works randomly

 *  [nicodweb](https://wordpress.org/support/users/nicodweb/)
 * (@nicodweb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/works-randomly/)
 * Hi.
    I use this function with your plugin : if ( defined(‘BA_ADBLOCK_ENABLED’)&&
   BA_ADBLOCK_ENABLED == true ){ echo “
 * <h1>Vous utilisez un bloqueur de pub c’est pas bien !</h1>
 * “;
 *  }
    But the message display randomly when i play with my broswer adblock extension(
   active and desactve adblock) . is the detection is automatic or is their some
   cache cookies or something wich delay the message?
 * [https://wordpress.org/plugins/blockalyzer-adblock-counter/](https://wordpress.org/plugins/blockalyzer-adblock-counter/)

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

 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/works-randomly/#post-5908346)
 * Hi,
    does your site use a cache?
 * There is no cache in the plugin, but it might be, that the cookie with the information
   is changed with one page view as delay.
 * Thomas
 *  Thread Starter [nicodweb](https://wordpress.org/support/users/nicodweb/)
 * (@nicodweb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/works-randomly/#post-5908354)
 * Thanks Thomas.
    The website doesn’t use cache but I will install wp super cache
   when it will be launched (the website is under development). If it’s a cookie
   pb do yo thinks I can reduce this delay : any idea?
 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/works-randomly/#post-5908358)
 * It you plan on using cache, you might want to rewrite your code to only use javascript
   to display the message. Please have a look at the js code that checks for adblockers.
   It contains all information you might need to make it work. Unfortunately, I 
   don’t have a live example that I can give you.
 *  Thread Starter [nicodweb](https://wordpress.org/support/users/nicodweb/)
 * (@nicodweb)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/works-randomly/#post-5908361)
 * Ok thanks for the help !

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

The topic ‘Works randomly’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/blockalyzer-adblock-counter_ffffff.
   svg)
 * [BlockAlyzer - Adblock counter](https://wordpress.org/plugins/blockalyzer-adblock-counter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/blockalyzer-adblock-counter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/blockalyzer-adblock-counter/)
 * [Active Topics](https://wordpress.org/support/plugin/blockalyzer-adblock-counter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/blockalyzer-adblock-counter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/blockalyzer-adblock-counter/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [nicodweb](https://wordpress.org/support/users/nicodweb/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/works-randomly/#post-5908361)
 * Status: not resolved