Answer the question
In order to leave comments, you need to log in
How to check on the client side if the site is blocked?
Social media is blocked at work. There is a site on which buttons from social networks are installed (share, likes). So, if facebook cannot connect to its SDK, then it displays a half-page message that the server is blocked.
The question is how to check if facebook is available, and depending on this already connect or not connect the button on the client? Or maybe there are other ways to solve the problem?
Answer the question
In order to leave comments, you need to log in
The easiest way (if this is not the only way) is to try to suck a picture (for example, a logo).
Only I did not find a normal picture on the fb domain. I hope you succeed.
$("<img/>")
.load(function() { console.log("VK works"); })
.error(function() { console.log("VK closed"); })
.attr("src", "http://vk.com/images/camera_a.gif");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question