It's quite common for companies to block social networks by proxy. Now, if there is a "like" button on a page it needs a script
(for instance, Facebook .js), but since the access is blocked, browser will try to load it for two minutes or so and thus the rest of the page won't load.
Is it possible to check with JavaScript whether some particular website is available and load a script only after that?
Let's say there are Facebook, Twitter and Google+ on the page, and Facebook and Twitter is blocked.
<script src="facebook-api.js">
<script src="twitter-api.js">
<script src="google-api.js">
Google+ won't load. What can we do in this situation?