typewriterFacebook chat, notifications, and updates that follow you everywhere you go on the web, right in your web browser, is a cool idea. What’s even cooler is how Mozilla and Facebook actually built it.

Facebook shared a few of those details today.

Mozilla’s goal was to build a Social API that would integrate content from any social network directly to your browser, even when you’re not on the actual social network’s website, Facebook engineer Pamel Vagata said in a post.


Facebook’s implementation keep you connected with your Facebook friends while you surf the wider web.

Facebook Messenger for Firefox is the first Facebook product to use a key new feature of HMTL, WebSockets, at scale. WebSockets enable persistent connections between your web browser and a webserver in a manner that scales well and also uses few resources. Facebook rolled out WebSockets on its existing chat servers but also had to reengineer its front-end Messenger code to eliminate dependencies on code fragments that simple are not available in the browser implementation.

Facebook credits its organizational structure — small groups, independent engineers — with the capability to make the changes quickly.

“Our ability to work with a small team and push code on a daily basis meant we could rapidly iterate on the API design and feature work to get this integration into the wild,” Vagata said.

Facebook is the first major social network to make use of this API, but theoretically, any such site could make use of it. Just a few days ago, Mozilla released a demo of Social API with WebRTC that shows off even more advanced functionality, such as chatting, video chatting and file sharing.

Here’s Mozilla’s overview of its Social API with WebRTC:

photo credit: Βethan via photopin cc