Home page > Scripts > How to block Facebook’s narks

How to block Facebook’s narks

Tuesday 27 April 2010, by Fil

All the versions of this article: [English] [français]

With its Social Plugins introduced a few days ago, Facebook wants to add a “Like” button on all the pages of the Web. It’s probably great for this company to know who is looking at what page on each site at every moment... But I don’t like it.

You just have to leave FB, will you tell me. Not so simple. With these plugins every webmaster is encouraged to add on her own pages a little line of code that directly informs Facebook of the fact that you are reading that page.

If you are connected to Facebook with the same browser, the message that displays is personalized with your name and your friends and so on. If you are connected, FB knows your name and can register where you go on the Web; but in all cases, even if you are not connected to FB, Facebook receives an information on the fact that you are visiting that page.

To mitigate the problem, open your favorite ad blocker, and add the following personalized rule:

This tells the ad blocker to block all calls to Facebook’s resources from any other site than FB itself. This way, I can still use FB if I want, but won’t be traced on other sites.

As Horatiorama has noticed, one must also add a line against the Facebook CDN (content delivery network) fbcdn.net.

And while I’m at it, let’s add a rule to block Google Analytics’s nark:


For Firefox, I use Adblock Plus :

For Chrome, AdThwart (see also Facebreak which claims to block FB’s plugins):

And, for Safari, Adblock:

With this method I can continue using Facebook if I want, without letting it spy each of my visits to any of the sites that had the stupid idea of activating one of these so-called “social” plugins.

P.-S. I can only imagine that this problem will soon be discussed in a tribunal. In Europe privacy is still an important legal question. But that’s not the subject of this quick note.

Your comments, especially to give better blocking methods, are welcome.

17 Forum messages