Maker tech hub — AI · 3D print · Pi · ESP32 · plus the classic tech archive.

Free ESP32 kit · Books · Network Ninja · Archive

Classic tech archive. From the original averyjparker.com tech blog — historical context; pair with modern guides where noted. Full archive · Maker projects · Network Ninja

Classic tip · Classic

Serving up web ads to users with javascript disabled

Well, with all the news on the Explorer bug, I started wondering what affect this would have on people browsing sites with adsense. I mean, adsense relies on javascript, so if it's disabled, no adsen…

Written by

Avery J. Parker

IT veteran, maker educator, and author of Network Ninja, 3D Printing Mastery, and AI Workflow Mastery. Business IT: Diversified Tech Solutions.

Well, with all the news on the Explorer bug, I started wondering what affect this would have on people browsing sites with adsense. I mean, adsense relies on javascript, so if it's disabled, no adsense right? Right... Of course, adsense is not the only advertising program that uses javascript. (Of course, there are a number of other things, web counters like google analytics, etc....)


I found an interesting solution to solve it.... the noscript tag. Simple elegant and "why didn't I think of that..."

Just make your HTML look like this:



<script>

... Google AdSense Code....

</script>

<noscript>

.... some affiliate code here....

</noscript>

This does NOT constitute modifying the adsense code and is perfectly acceptable under Google's guidelines (and probalby any other ad service).

So now all you have to do is decide what alternative ads to offer.