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:
Solution 3
The add-on RequestPolicy does what you're asking for, allowing both temporary and permanent white-listing.
Mozilla Addons - RequestPolicy
Solution 4
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.
Related videos on Youtube
roykasa
Updated on September 17, 2022Comments
-
roykasa over 1 year
I have this code snippet here:
<?php include('a.php'); include('b.php'); include('c.php'); include('d.php'); include('e.php'); ?>
I would like to have a loop run through this file and execute each of these files once. How can i go about this? I am new to php.
-
subhojit777 about 11 yearsWhy cannot you include all of them at once?
-
roykasa about 11 yearsAm sorry but i dont get what you mean.
-
subhojit777 about 11 yearsI mean what is the problem in adding all these file at once?
-
roykasa about 11 yearsWell the thing is i have different queries in the files labelled a, b c , d and e. Each of these queries is executed differently and one at a time. When the query is done, the results are exported to excel and the file is downloaded. I would like to have this done within one file such that when the file is executed, then the queries are run in a loop rather than doing it one at a time which takes long
-
-
Wayne Bloss almost 14 yearsThanks for your response. I would allow requests to staticpaypal.com when I'm visiting paypal.com. I realize it would be somewhat painful to have to do this the first time I visit a page, but I wouldn't mind.
-
mindless.panda almost 14 yearsAs far as manually allowing requests to 3rd party sites, it seems this would get tedious each time you have to load a website and determine what 3rd party sites to allow or not allow.
-
roykasa about 11 yearsWell the thing is i have different queries in the files labelled a, b c , d and e. Each of these queries is executed differently and one at a time. When the query is done, the results are exported to excel and the file is downloaded. I would like to have this done within one file such that when the file is executed, then the queries are run in a loop rather than doing it one at a time which takes long
-
Danilo Kobold about 11 yearsDo you mean run in parallel instead of loop?
-
roykasa about 11 yearsAnd by the way the solution you have given me returns this error: PHP Warning: include_once(): Failed opening 'aphp' for inclusion Its like the "." is not recognised or something. And yes i would like them to run in parallel if its better.
-
Danilo Kobold about 11 yearsI dont think that parallel will do any good, unless it's on different databases.
-
roykasa about 11 yearsNo its on the same database. If this wont do any good then how can i go about the problem i have because now currently with the loop here, it executes only the first file and then stops. It doesnt proceed to execute b, c, d and e
-
Danilo Kobold about 11 years
-
YetAnotherRandomUser over 7 yearsIt's supposed to anyways. It works in conjunction with other tools like NoScript.