I don’t have a lot of time to post right now, but I just wanted to leave this note. Now that Facebook has completely rolled out their Facebook chat integration, I had to block it at work (The only chat allowed is our internal XMPP server.) Blocking the feature is as simple as blacklisting a single URL, drumroll….
http://facebook.com/ajax/chat/
Done, now users will see how many friends are online, but if they go to send anyone a message, it will never go through, and chat history does not show up. I am sure you can block more extensively, but for a quick and dirty fix, this does the trick. Love being an administrator…









Thank you so much, It is very elegant.
Thank you! Very useful. Simple and effective.
Thanks! AWsome ! Have a nice summer!!!
Thanks alot, noticed quite a few of our clients using this when they shouldnt (Ive banned chat) so this will do the trick.
Added that to Squid and it’s still working.
Checked the page source and it doesn’t mention that url at all.
@Arckane: It does not mention it in the source however if you run a TCP Dump you will see HTTP POST to that address. If you want to tighten it up even more you can block facebook.com/images/chat/ which will (obviously) block all images related to the chat interface. We could block certain javascript libraries/classes but that would break other things as well.
On another note, users will be able to receive messages, but not send using this block.
You can also block the ‘Online friends’:
http://www.facebook.com/ajax/presence
This way the number of online friend will always be 0.
tried all these in my router and they didn’t block anything. it all worked fine. should i be adding them somewhere other than my blocked keywords list?
I’ve tried this in hosts file and on Linksys router exceptions list.
These blocks do not work for me, what am I doing wrong?
This no longer works. Facebook must have changed things.
I found that blocking facebook.com/ajax/presence works.
Anyone have a working solution?
Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.
You are EVIL!
I don’t think your clients will be very happy either. They may not want to be your clients anymore! Ah, I get it, you’re just losers! Ok.
I’ve blocked 69.63.176.193 at the firewall, and it seems to work
@Jane
You don’t know what you are talking about. We are in a SCHOOL, the students are not supposed to chat during class. It is normal to block chat.
Internet acces is a privilege, not a right.