How to make Google ads show in Firefox
You may have thought you read that headline wrong. Why would anyone want to see ads — wouldn’t you rather make them go away?
This article is for web designers who need to make sure their designs work in various web browsers, including Firefox. A frustration that occasionally comes up is that ads from Google’s Adsense program don’t display in Firefox. There are a few solutions scattered around the web, but none of them worked for me, and I get the impression that a lot of other people have been left hanging.
Here are some typical answers:
1. You’ve got the Ad Block extension on. This is sometimes offered with a wink, because — duh! — how could you not figure this out for yourself? I’ve never used Ad Block, so that wasn’t the solution.
2. You’ve got Javascript turned off. How many people take the trouble to go into their preferences and turn off Javascript? I suppose it’s possible, but, really, if you’re smart enough to turn it off, you’re likely smart enough to know that it will affect your browsing experience. Again, this didn’t apply to me.
3. Clean out your cache and delete your cookies. This seems like a good all-purpose solution for a lot of problems. Apparently it works for for some people, but it didn’t for me.
4. An oblique mention of a file called userContent.css finally clued me in. This is a text file you can create using cascading style sheets to control what you see on various websites. One of the things you can do with a file of this type is instruct a web browser to block advertising. You can download one that does just this from Floppy Moose.
I’ve never used such a file for Firefox, but I have tried it for Safari. The great thing about Safari is that you can turn it off or on in the preferences under the Advanced tab where it refers to Style sheet. With Firefox, it’s simply installed in a certain folder and goes to work. As a last-ditch effort, I decided to see if userContent.css was in indeed in this folder — even though I never actually put it there.
And wouldn’t you know it, there it was in all its ad blocking glory. I have no idea how it got there, but I removed it and the ads came back. Hallelujah!
And where is that folder? home:Library:Application Support:Firefox:Profiles:profilename:randomstring.default:chrome: You can learn more at Floppy Moose. It’s also documented at mozilla.org.
Oh, and one last thing: I’ve given this post a search-engine friendly headline in the hope that it will help others in the same boat.
Posted Monday, September 28, 2009 in How-to
Previous: NetNewsWire out of beta and into ads
Next: macgameshuffle now twice as fast