How to block/remove advertisements from FaceBook and MySpace

Posted on August 28, 2007 at 3:48 pm

Wouldn’t it be nice if you could browse your FaceBook or MySpace without all of the ads and clutter? Personally, I don’t mind text ads, but I can’t stand those annoying animated flash banner ads that takes longer to load than the rest of the page!!! Why wait an extra few seconds on every page for ads to load up if you’re not going to click on them.

I have found that FaceBook is not quite as terrible as MySpace, where I can barely see anything on my profile page with the header ad, the text ad, the Featured Profile ad, and the footer ad! Luckily, there’s a great tool that you can use that’s part of FireFox to stop all of those annoying ads.

GreaseMonkey, if you’ve never heard of it, is a add-on for FireFox that allows you to manipulate the way a web page is displayed by using small pieces of JavaScript code. So, for example, you can replace buttons, add items to a web page, or add completely new functionality to a web page. To install GreaseMonkey, you’ll need FireFox.

Once you have installed GreaseMonkey, you’ll see it under Tools and also a small monkey face icon in the bottom status bar.

greasemonkey

Make sure the Enabled menu option is checked. Now go to the script resource web site at http://userscripts.org/ to install the FaceBook and MySpace scripts. Simply click on the Install Script button at the top right and wait for a minute or so while it installs. You won’t receive a  message acknowledging that the script was installed, but you can check by choosing Manage User Scripts from the Tools – GreaseMonkey menu item. If it’s listed there, that means it’s installed.

greasemonkey scripts

For me it’s done wonders! Here’s what my MySpace profile looks like without the ad removing script:

myspace ads[1]

There are three huge ads in this screen shot and there’s another one that’s a little lower, but not shown here. Once I installed the script, now my profile page looks like this:

block ads[1]

Far better than what it was like before! Same thing applies to FaceBook, though I really don’t mind FaceBook’s ads since there really is only one and it’s off to the side.

facebook ad facebook ad removed

There are many more ad blocking scripts that you could install, such as for eBay, Amazon, Hotmail, Yahoo Mail, Digg, GMail, Mininova, Anandtech, Rapidshare, Photobucket, IMDB, etc, etc. These will make your browsing much cleaner and much faster!

If you want to block ads while browsing any web site, you can install a FireFox add-on called AdBlock Plus, which blocks most advertisements on the Internet automatically. If something is not blocked, you can right-click on an image and tell it to block that ad manually!

If you want to block text ads from Vibrant Media, AdBrite, Kontera, LinkWorth and EchoTopic use this GreaseMonkey script called Disable Text Ads. Using these four to five add-ons and scripts, your web browsing experience should be ad free!

If you liked this Greasemonkey script, make sure to check out my other post on 25 Greasemonkey scripts you don’t want to miss!

Any questions, post a comment!

[tags]block ads, how to block ads, block internet ads, ad blocker, block advertisements, remove ads, how to stop ads[/tags]

» Filed Under Computer Tips

Related Posts

Comments

21 Responses to “How to block/remove advertisements from FaceBook and MySpace”

  1. Eddie said on :

    Is there a way to remove the myspace ad banner for Internet Explorer?


  2. IGE OLUWASEYE said on :

    Dear Sir

    I really enjoyed reading through your website and those vital information which I found here.

    Please, I wish to make an enquiry if it is possible to block stolen laptop from usage. My laptop was stolen some months ago and want it to be blocked from usage.

    Is it possible? Kindly let me know via my e-mail address. Thanks.

    IGE


  3. Weasel said on :

    To Eddie:

    Yes, it is possible to do the same thing in Internet Explorer. Here’s how:

    Go to Tools->Internet Options, and click on the “Security” tab. Next, click the icon for “Restricted Sites” and the “Sites” button should become enabled. Click that, and it’ll bring up a dialog where you can add individual domains and sites to IE’s blocking list.

    The other part is that you’ll have to log into MySpace, and “View Source” on the HTML, and figure out where/what domains the ads are coming from. I think they’re generated by Javascripts which come from “x.myspace.com” but I’m not 100% sure.. It’ll vary from site to site.

    Example: view source on this page right now. You’ll see right below the AdSense ads, a script coming from “ads.pubmatic.com” — You could add that domain to the blocked sites list, and voila! You’d be viewing this page minus the AdSense block. But DON’T DO IT HERE!

    Of course, you don’t want to do that because you’d be depriving our beloved webmaster Computer Guy of his ad revenue, which defeats his entire idea of monetizing this site, which leads to his overhead costs coming out of his own pocket, all because he wants to provide you and I with this helpful information. So don’t do it here, I was just showing you as an example.

    MySpace is a poorly-designed ad-whoring juggernaut, so your blocking of a tiny fraction of their zillion-dollar-a-day ad income won’t make much difference to them, but it’ll make a world of difference to the web browser of you, the end user!

    –Weasel


  4. Lisa said on :

    Excellent, thank you!


  5. Jimmy said on :

    Um, hmmm. Here’s how to block ads, but just please don’t do it on our site.

    I don’t think so…….


  6. dhen said on :

    I want to block the ads on my profile on tagged, but I don’T know how…please HELP me! I don’T mind if it is just text ad but I hate those ads with disgusting pictures I want them OUT on my page! T_T


  7. Doug C. said on :

    Aseem, thank you very much for this article. I was about ready to deactivate my Facebook account because of the disgusting ads I was getting. Now I am add free, thanks to this.

    I just made a blog post about this with a link to your page here.

    Thanks again.


  8. glenn said on :

    I already use Adblock and NoScript, so I don’t see banner ads and such. Will this block “Sponsored” text ads? That’s what I’m trying to stop.


  9. Doug C. said on :

    Glenn, there is a GreaseMonkey script to disable text ads.


  10. C.M. F said on :

    How do you unblock yourself from someone else’s facebook profile? Is that possible?


  11. awjohnso1 said on :

    The ad blocker plus worked great for facebook. Thank you very much. Their ads were a little annoying. You were a big help.


  12. carolina said on :

    how can i block Facebook, Myspace, and adult web pages ?


  13. snarfy23 said on :

    @carolina: Unplug your network cable ^_^


  14. akishore said on :

    Carolina, if you want to block entire web pages, not just advertisements, you need to get some kind of parental control software. Read my previous post here on how to block Internet websites using free software.


  15. Rene' said on :

    I’m using IE on Facebook. An offensive ad popped up on my Facebook profile, so I rt clicked on the ad and copied the url and pasted it into the Restricted Sites zone of the Securities tab as instructed above, and when I refreshed the page that one particular ad was gone, but 4 more (albeit nonoffensive) popped up in its place. I would love an ad free profile page, offensive or no. What am I doing wrong.
    Thank you for your help!


  16. Steve said on :

    You may find instructions on how to block facebook ads using the add-on Adblock Plus in Firefox at http://www.berlineradler.de/index.php?topic=2042.0

    contra ads ;)


  17. Sam said on :

    what about blocking facebook adverts on Google Chrome?!


  18. Carl said on :

    Is there a way of removing facebook ads on internet explorer? I’ve tried the security and restricted sites and that doesn seem to be workin.


  19. Weasel said on :

    I just discovered another way to block Facebook ads in IE! Make a file called “usercontent.css” and put it somewhere safe (such as My Documents).. Next, edit the file (using a text editor) and put the following in it (minus the BEGIN/END lines, of course):

    ————-BEGIN What-To-Put-In-It—————–

    #ssponsor, .footer_ad, .banner_ad, .social_ad, .ad_capsule, .sidebar_ads, .adcolumn, .admarket_ad, .sidebar_item.sponsor, .emu_sponsor, .home_sponsor, .UITitledBox_Title
    {
    display: none !important;
    }

    ————-END What-To-Put-In-It—————–

    Next, in IE go to Tools->Internet Options, and click on the “Accessibility” button. Select the “Format documents using my style sheet” checkbox, and browse to the usercontent.css file you created earlier. Click OK, OK, then Facebook ads should be hidden! They will still be pulled from the server and loaded by the browser, but the stylesheet will refuse to display them, as they are now hidden!

    I imagine that this same trick can be applied in Firefox without Greasemonkey (or any Mozilla browser, for that matter) as well. Just add it to the usercontent.css file (see Google for more info on usercontent.css)

    I dunno if Google Chrome has user-definable CSS, but if it does then this should work there too!


  20. Derrick S. said on :

    To Weasel:

    Well that was just dandy, it disabled the ads on the side, but it crippled flash too! Is there any way to get the ads gone, but not cripple flash?


  21. facehatebook said on :

    Thanks, it works like a charm for facebook.


Please post your comments/suggestions!