Tag Archives: like button

Blocking Facebook’s Like Button with Squid

So, I read this story today, which says the following:

Even if someone is not a Facebook user or is not logged in, Facebook’s social plugins collect the address of the Web page being visited and the Internet address of the visitor as soon as the page is loaded–clicking on the Like button is not required. If enough sites participate, that permits Facebook to assemble a vast amount of data about Internet users’ browsing habits.

Well, that’s creepy. Even though I deleted my Facebook account, they’re still trying to collect information about me by embedding themselves in other websites. Well, that happens to be really easy to fix for my entire network running through a Squid proxy server:

# Facebook Like Button Denial
acl facebook dstdomain .facebook.com
acl facebook_like urlpath_regex -i ^\/plugins\/like\.php
deny_info error-facebook-like facebook_like
http_access deny facebook facebook_like

I also had to create this file in my error_directory: /usr/share/squid/errors/en/error-facebook-like

<p>This just in: <b>Facebook Sucks.</b></p>

Now, when I go to a site with a Like button on it, it looks like this:

But Kelsey can still get to her beloved Facebook directly! Thanks, Squid team.