Facebook.com launched in 2004 as a simple, server-rendered PHP website. Over time, we’ve added layer upon layer of new technology to deliver more interactive features. Each of these new features and technologies incrementally slowed the site down and made it harder to maintain. This made it harder to introduce new experiences. Features like dark mode and saving your place in News Feed had no straightforward technical implementation. We needed to take a step back to rethink our architecture.
We knew we wanted Facebook.com to start up fast, respond fast, and provide a highly interactive experience. Although a server-driven app could deliver a fast startup time, we weren’t convinced we could make it as interactive and delightful as a client-driven app. However, we believed we could build a client-driven app with a competitively fast startup time.
But starting from the ground up with a client-first app brought a new set of problems. We needed to rebuild the site quickly while also addressing speed and other user experience issues — and we needed to do it in such a way that it would be sustainable for years to come.
Throughout the process, we anchored our work around two technical mantras:
- As little as possible, as early as possible. We should deliver only the resources we need, and we should strive to have them arrive right before we need them.
- Engineering experience in service of user experience. The end goal of our development is all about the people using our website. As we think about the UX challenges on our site, we can adapt the experience to guide engineers to do the right thing by default.