How Facebook made mobile site faster for users with limited bandwidth

Facebook engineers rose to the challenge of shrinking profile cover photos to 200 bytes

Facebook has engineered a way to blur the cover photo to reduce bandwidth consumption

Facebook has engineered a way to blur the cover photo to reduce bandwidth consumption

By resorting to unconventional engineering, Facebook saves users in developing countries precious bandwidth while still offering them a close-to-optimal Facebook experience.

In tackling the problem, the Facebook engineering team didn't turn to new technology, but rather thought hard about the tools it was already deploying.

"We used existing technology, but in a kind of clever and unique way," said Brian Cabral, Facebook director of engineering.

The work they did cut the time it takes to download a Facebook page in limited bandwidth conditions by 30 percent. The page could be viewed more quickly, both on the Web and through the company's mobile app.

They also learned some lessons in how much an image can be compressed and still be useful.

With over 1.49 billion users, Facebook is now courting people in parts of the world where neither computers nor high-speed Internet connections abound. That's why it has been looking for ways to conserve bandwidth, so people on slower 2G networks can still use the service.

"Especially in places like India and developing markets, 2G is still the dominant network," said Marty Greenia, a Facebook software engineer.

One of the first projects was trimming the size of each user's cover photo, the image that stretches over the top of profile pages.

This cover photo can run 100KB or larger, which can take some time to download on a 2G connection that tops out at 32KB per second.

As a result, users with limited bandwidth would not see the image for those profile pages they visited, at least not initially. This isn't a desirable Facebook experience.

For low-bandwidth users, the Facebook engineering team wanted to reduce the size of each photo to, ideally, 200 bytes. An image made from 200 bytes, which is a mere 1,600 individual bits, would download quickly even on a slower connection.

Putting images on a 200 byte diet would be quite a challenge, given that the JPEG image format everyone uses for their photos already compresses images, quite efficiently.

The engineering team attacked the problem in a number of ways. "We thought long and hard about this," Cabral said.

One approach the team used was to make a copy of the photo as a frosted-glass impression, in which the details are blurred out, reducing the image size. The frosted glass impression could serve as a stand-in until a full size copy of the image could be downloaded.

Even with the image blurring, the size needed to be cut further, Cabral and Greenia explained in a jointly authored blog item posted Thursday describing the work.

They found that each JPEG file comes with a lot of metadata, describing the attributes such as the photo size. But given that this header data was the largely the same in all cover photos, it could be easily removed and recreated with fixed headers stored on the user's device. "We knew what those bytes would look like," Cabral said.

Finally, a couple of crafty, non-standard compression schemes also helped cut the images to the required size.

The techniques they deployed worked well not only for users with limited bandwidth, but also for all wireless users.

During time of network congestion, a frosted image will often pop up for a few seconds before the full image can be displayed, leading to a more seamless Facebook experience, Greenia said.

Another advantage the work offered was that it could save a bit of money for those on metered data plans, which is often the case for people on 2G networks in developing markets.

"Often people are making trade-offs between using their data plan and using their money for other things," Greenia said. "I feel proud when I can save someone money."

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags Development toolsapplication developmentsoftwareFacebook

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Cool Tech

Breitling Superocean Heritage Chronographe 44

Learn more >

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?