Tuesday, February 03, 2009

Facebook broken for AdBlock Plus in Firefox

For the last day or so I’ve noticed that Facebook has had major issues when I view it with Firefox 3.0.5. If I do a Refresh of pages, I can usually get places, but it was almost as if a lot of the AJAX and dynamic stuff that normally happens was not working, and any postbacks (like commenting, searching for a friend, etc) would “freeze up” the site and I would have  to do a refresh to get to the next page or to see the results of my action.

This not being my first rodeo, my first instinct was to disable my Firefox add-ons by restarting in safe mode.

firefox.exe -safe-mode

Sure enough, now Facebook was working perfectly again. I then had another series of hunches which turned out to be correct.  First, I figured that AdBlock Plus or Firebug would be the offending extensions, and sure enough it was AdBlock. So, I right-clicked on the ABP icon in the Firefox status bar and went to Open Blockable Items. Looking at the list of things that were blocked (they show up in Red), I had a hunch to look for a script file, since the AJAX and dynamic stuff is what seemed to be broken.  There was only one script blocked for me:


So, I double-clicked on this blocked item to bring up the dialog to add an exception rule.  Just in case they feed this script from different addresses or different CDN servers, I made the exception a bit more robust than just the address above:


After adding this exception rule, and reloading the page, everything is working ship shape again.

Now, my question is this – was this an attempt by Facebook to force people to turn off ad blockers in order to make Facebook function properly?  It seems to me that this script file should probably only handle loading the ads and such (judging by the name), thus it must break some of the other functionality only because other scripts detect that it is not loaded and do not function unless it is loaded. The last line of that script is this:

if (window.Bootloader) { Bootloader.done(["js\/adnetwork\/adnetwork.js"]); }

So, maybe Bootloader has been changed to make the site not work correctly if this has not been called?

Experiment time! 

So, I removed that exception I added, and once again the site is broken. This is visually apparent when I look at the search box typically present in the top right corner.  It doesn’t have the watermarked text saying Search.

I open up Firebug and enable the Console for facebook.com, so that I can run some of my own script on this page.  Running the last line of that script myself fixes Facebook!  Here is a screencast of the experiment:


Disqus for A Nofsinger's Blog