Snippets – Detect Adblock | byteMyCode


If your site is funded by advertisements, you may be annoyed with the growing use of AdBlock.

Well, a fair way to deal with AdBlock users is to degrade content (e.g., limit your archives, serve lower-bandwidth versions of images, prevent downloads, etc). The simple PHP script below will have your browser look for the presence of AdBlock/AdBlock+ and run a little Javascript of your choosing if AdBlock is present.

via Snippets – Detect Adblock | byteMyCode.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s