Just in:
Abu Dhabi Secures US$5 Billion in Fresh Funding // PolyU forms global partnership with ZEISS Vision Care to expand impact and accelerate market penetration of patented myopia control technology // Andertoons by Mark Anderson for Thu, 25 Apr 2024 // ZUHYX Exchange: Embracing Social Responsibility for a Sustainable Future // Galaxy Macau’s Sakura Cultural Festival Kicked off in Splendor // Leading with Compliance, ZUHYX Earns the Canadian MSB License // Astana International Exchange Connects with Regional Markets Through Tabadul Hub // Central Bank of Nigeria Debunks Rumors of Crypto Account Freeze // Cobb’s Game-Changer: Introducing One-Stop Event Transport Management Solution // UAE President, Spanish Prime Minister Hold Phone Talks // NetApp’s 2024 Cloud Complexity Report Reveals AI Disrupt or Die Era Unfolding Globally // Telecom Giant Du Eyes Crypto Integration for FinTech Platform // Sharjah Census Gears Up for Final Enumeration Phase // Cairo Recognizes Arab World’s Creative Luminaries at Award Ceremony // Lee Chong Wei Shows Up On Chinese Hot cultural Talk Show “SHEDE Wisdom Talents”, Talking About “Crossing The Hill” // Ministry of Agriculture Supports Taiwanese Tea’s Entry into Singapore Market to Boost Global Presence // Election Commission Has A Dismal Record On Acting Against Modi’s Breaches Of Poll Code // Lai & Turner Law Firm PLLC Welcomes Eric Strocen as Director of Family Law Division // Oman Seeks Growth Through Strategic Economic Alliances // DIFC Courts Cement Role as Top English Dispute Resolution Choice //

How Facebook helped tweak Chrome and Firefox to download pages faster

1485451466 facebook to build a standalone camera app similar to snapchat one touch photo and video sharing

facebook-to-build-a-standalone-camera-app-similar-to-snapchat-one-touch-photo-and-video-sharing.jpg

Facebook says it has worked with Firefox and Chrome engineers on tweaks to their browsers that should make web pages download “dramatically” faster.

Over the past two years Facebook has been working with the Chrome and Firefox teams to improve browser caching. As a result, both have recently launched features that make their caches significantly more efficient for Facebook and the rest of the web.

ADVERTISEMENT

Facebook’s Ben Maurer and Nathan Schloss said the changes have helped reduce static resource requests to its servers by 60 percent and improved page load times as a result.

A static resource is a file that a server reads from disk and serves to the browser without running any extra code. Browsers often reuse things like logos or JavaScript code across different pages, and it’s wasteful if browsers download them over and over again.

To prevent this, HTTP servers can specify an expiration time and a validator for each request. The expiration time tells the browser how long it can reuse the latest response for, and the validator allows the browser to continue to reuse the response even after the expiration time by allowing the browser to check with the server.

This raises other questions for web developers: how long should expiration times be? Too short and browsers will be checking in with servers too much; too long and browsers will be showing out-of-date information.

To get around this, Facebook uses the concept of ‘content addressed URLs’ so that its URLs are a hash of its content, which can then have a very long expiration time — a year, for example. And because the contents of the URLs never change, Facebook’s servers respond with a 304 not-modified response for any and all conditional requests for static resources, which saves on CPU cycles.

A 304 response is more efficient than downloading unneeded code, but it doesn’t eliminate the latency of the browser talking to the server.

“Every time a not-modified response is sent, the browser already had the correct resource. We want to avoid these wasted revalidation by allowing the client to cache for longer,” Facebook said.

Tweaking the browsers

But in 2014 Facebook found that 60 percent of requests for static resources resulted in a wasteful 304 response, and starting looking for ways to cut these down. It also noticed that there were substantial differences between the performance of different browsers: 63 percent of requests from Chrome were conditional, compared to 13 percent for Firefox, 14 percent from IE and 22 percent from Safari.

Facebook worked with Chrome’s engineering team to fix the issue and Chrome’s conditional requests dropped to 24 percent. Further tweaks saw the percent of Chrome conditional requests drop “dramatically” Facebook said.

In testing the Chrome team found that for mobile users with a 3G connection across all websites, reloading was 1.6 seconds faster with this change.

Facebook also worked with Firefox to add a new cache-control header for some resources in order to tell the browser that this resource should never be revalidated.

“Chrome and Firefox’s measures have effectively eliminated revalidation requests to us from modern version of those browsers. This reduces traffic to our servers, but more importantly improves load time for people visiting Facebook,” the company said.

(via PCMag)

ADVERTISEMENT

ADVERTISEMENT
Just in:
UAE President, Spanish Prime Minister Hold Phone Talks // Leading with Compliance, ZUHYX Earns the Canadian MSB License // Lee Chong Wei Shows Up On Chinese Hot cultural Talk Show “SHEDE Wisdom Talents”, Talking About “Crossing The Hill” // Central Bank of Nigeria Debunks Rumors of Crypto Account Freeze // Cobb’s Game-Changer: Introducing One-Stop Event Transport Management Solution // AVPN Charts Path Forward at 2024 Global Conference // New Dynamics in Cryptocurrency Security: ZUHYX Builds the Strongest Fund Protection System // PolyU forms global partnership with ZEISS Vision Care to expand impact and accelerate market penetration of patented myopia control technology // Hong Kong Unveils April 30 Launch for Landmark Crypto ETFs // Etihad Airways Announces Paris Service with A380 // Ministry of Agriculture Supports Taiwanese Tea’s Entry into Singapore Market to Boost Global Presence // Quality HealthCare Partners with eHealth to Enhance Patient Treatment Efficiency // Lai & Turner Law Firm PLLC Welcomes Eric Strocen as Director of Family Law Division // Prince Holding Group’s Chen Zhi Scholarship Clinches Silver Stevie for CSR Excellence at Asia-Pacific Stevie Awards // DIFC Courts Cement Role as Top English Dispute Resolution Choice // ZUHYX Exchange: Embracing Social Responsibility for a Sustainable Future // UAE Scrutinizes Report on Racial Discrimination Treaty // NetApp’s 2024 Cloud Complexity Report Reveals AI Disrupt or Die Era Unfolding Globally // Abu Dhabi Secures US$5 Billion in Fresh Funding // Election Commission Has A Dismal Record On Acting Against Modi’s Breaches Of Poll Code //