Block all third party domains from web pages

Solution 1:

The add-on No Script probably does what you want. I appreciate that I have to explicitly allow those scripts/domains that are needed for a page and can easily keep other certain scripts/domains from ever firing. It's also very nice that you can temporarily allow a domain so that you can see if it really is vital for the page/site to function.

Which reminds me: I really need to donate.

Solution 2:

I just discovered a program called "Ghostery" that allows you to view/prevent third-party sites that track you, maybe it can help you out. It has plug-ins for all the major web browsers:

http://www.ghostery.com/

Solution 3:

I would caution you against doing this. While you may think that this will solve snooping and cross site request forgery, it will only cause more problems. A lot of websites have a separate domain such as paypal.com I think has staticpaypal.com which is responsible for loading all of the static content like images, video, scripts, etc.

You will notice that this causes a lot of trouble if you were using Noscript. There's a ton of times where I go to a webpage and have to allow some third party webpage to load javascript (and other items) for the page to function or even render properly.

Solution 4:

The add-on RequestPolicy does what you're asking for, allowing both temporary and permanent white-listing.

Mozilla Addons - RequestPolicy