Facebook not only has the combined power of the largest social networks and messaging services on the planet (Messenger, WhatsApp, Instagram) with billions of users, but is also an integral part of a huge number of websites that use their services to add “Like” buttons and comments.
So perhaps it should not be surprising that of the 10,000 most visited websites on the planet, 6% have content that comes from the Facebook servers and that this is also a large part of the load of the page.
Ben Regenspan, a New York developer, explains in an article on his Medium how that content comes from the Facebook SDK, necessary for the aforementioned “Like” and comment system, but the social network requires a web to load the full SDK although just need a small fraction of its functions.
Historically more than 4 and a half million websites have used the content delivery network of Facebook (Facebook CDN), and currently, of the million most visited websites on the planet, 7% use it.
As Regenspan explains, the content that the webs show and that comes from the Facebook servers, is the SDK of the network. But the code portion is so large that it represents 16% of the total of all the Javascript that loads the page.
Unnecessary code that can not be avoided
The SDK contains a huge number of functions: methods to recover data from other websites, determine which browser and device a user has, support old browsers that use less than 1% of Internet users, etc.
The important detail is that more than 80% of the content of the SDK is written in such a way that, for example, to use only the “Like” function the web needs to load all the other functions that allow Facebook comments, inserting videos, login buttons, and more unrelated things.
Although if you live in a developed country with a decent Internet connection, this additional burden when opening a website is basically imperceptible, not everyone enjoys the same privileges.
In addition, there is the impact that this causes for those who maintain the websites they visit and that usually have to use third-party code in addition to Facebook for different analytics and functions. Code on top of code, on top of more code.
And, of course, as there is no way to jump this because absolutely all the functions reside within the same SDK, so you only have a button I like on your website, and Facebook has all its code running and collecting a lot of data about who they visit, and also those who maintain it.