I have absolutely no idea if its even possible but its something I'd like to experiment with.
I'd like to be able to detect if a file loads on my site that's being called from another location. The best example I can provide is the following:
I'm able to edit my computers host file to block specific domain names. If I have external.com blocked and mysite.com uses resources from external.com, those resources won't load.
So I'd like to know if there's any way I can detect weather any or all of the resources from external.com are loading when a user visits my site and if possible set up an action to redirect any users that have external.com blocked.
You can't detect if something is specifically blocked - but you CAN check to see whether or not it has successfully loaded by attaching an onload event to an element:
In HTML:
<element onload="doSomething()" />
In Javascript:
object.onload = function(){ //Do Something };
In Javascript attaching an event listener:
object.addEventListener( 'load', doSomething() );
I would suggest that maybe your 'doSomething()' function could set a flag when particular resources load, then you can check those flags with another function and take whatever action you deem appropriate if anything is missing.
The only problem is - with regard to your original question - you can't assume that they're blocking resources from blah.com ... only that resources from blah.com failed to load.