diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


Alternate Ads in Javascript Disabled Browsers using Noscript

If you publish javascript code in your posts & pages. And if the visitor has an outdated browser or has manually turned off javascript. In that case, they do not see the code. Here is the trick,

The idea was suggested by Thilak and is also drawn from this way to show SFX banners instead of Google ads when JavaScript is turned off. The tag noscript is used to specify the content which should be shown when the javascript code is not supported. So insert any content between the noscript tags

<_noscript>your code<_ /noscript>

(remove the _) to show the alternate url. Although you are not altering the Google Adsense code in any way and it should not violate their terms, but it is always best to check with Adsense support before doing this.

Now you might ask, that the Google Adsense code / other javascript codes have a facility to specify an alternate ad to show incase a targetted ad is not available. This is different. In javascript disabled browsers, the whole code will not show, which includes your alternate ad specified between the javascript.

Share This Story, Choose Your Platform!

Get Latest News

Subscribe to Digital News Hub

Get our daily newsletter about the latest news in the industry.
First Name
Last Name
Email address
Secure and Spam free...