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:



Anonymous said...

dude you're a genius. i had the same problem and googled my way to your blog. don't know much about computers but managed to solve it in no time.

Anonymous said...

Thank you for this post. I also tracked the post down via Google after encountering problems with both Firefox for Mac and Safari for Mac.

This did the trick.

- Tom, Stillwater, MN

Anonymous said...

Thank u SOOOO much for posting this. I had the same problem and your solution was very simple to implement and was also the correct fix! :-)

Lew A said...

That is so weird... thanks for the tip. I was really getting annoyed today.

neptunerav said...

Wow thanks, this helped so much

Anonymous said...

I thought it was just me - but even with your fix, I am still unable to edit (delete) wall items and it's still sluggish. I hated having to use IE to clean up my wall. THANKS!!!!

Anonymous said...

app bookmarks are missing from the bottom still

Anonymous said...

Is there a way to make this permanent? I have to run the script every time I load a new FB page.

Noffie said...

@Anonymous - I don't notice anything missing yet, but didn't thoroughly test this fix. Just know that it fixed things "enough" for me to use FB again in Firefox.

@Tim - The best permanent way I have found so far is to add the exception to Adblock Plus. I describe how to do that in the article first, before explaining the scripting stuff. Read carefully. :)

I tried making the Bootloader.done call into a greasemonkey script, but that doesn't work. Javascript console shows an error with "Bootloader is not defined." I guess greasemonkey scripts can't access javascript objects created in scripts on the page itself?

Anonymous said...

earlier problems seem to have resolved, at least for now. Thanks for the great post

Anonymous said...

I feel like I'm having a similar problem in the last several days but not entirely the same... I'm running Firefox with ABP and my issue is that my Facebook pages and profiles are loading fine - EXCEPT the profile photos themselves (thumbnails and otherwise). Uploaded photos, such as album photos, load fine - but it's the actual thumbnail or profile photo that usually exists for each user. These aren't loading at all. I've added your ABP exceptions to no avail... And have even tried running Facebook while having uninstalled (temporarily) ABP - still nothing. Any suggestions?

Noffie said...

@Anonymous w/ Profile Pic Issues - Have you tried running Firefox in safe mode and then trying the facebook?

"C:\Program Files\Mozilla Firefox\firefox.exe" -safe-mode

You can run that from command prompt to run Firefox in safe mode. Another good option is to try loading Facebook in another browser, such as IE or Opera or Google Chrome.

If it still doesn't work in safe mode or another browser, then it is probably a network or proxy issue - something like that. The server the profile pics are served from might be blocked?

Profile pictures are served from http://profile.ak.facebook.com/* , so make sure that ABP is not blocking that somehow, nor a proxy or HOSTS file or something.

Let us know what happens when you try another browser or safe mode.

Kirk Goodwin said...

Great catch. Unfortunately Webwasher also blocks this so Facebook is not ensuring a good portion of their users cannot access Facebook.

Anonymous said...

They changed the code recently.

The command is now

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

Unknown said...

I tried running it in safe mode and it still didnt work. I dont have AdBlock on firefox. This has been messed up for the past 3 weeks straight. Would going back to firefox 2 or 3.0 help at all??

Noffie said...

Not sure why you are having an issue Robby - it doesn't seem to pertain to the issue I address in this post.

Have you tried clearing your browsers cache? What FF version are you using? Have you upgraded to 3.5?

Snowblind Marine said...

thanks for this, it helped out a lot. i noticed though, that the news feeds and such were still not loading after adding that script. the exception i added was @@fbcdn.net and it was fine.

Neoconsole said...

luckly i did not have this problem... mind you i mostly just uses Opera..actually even that i'm having problems recently.

Disqus for A Nofsinger's Blog