Skip to content
 
Selected papers

2024RenderingPerformance

Can a browser make a page interactive without repeating the server’s work?

A page can record enough information in its HTML for the browser to resume the application and skip the work of rebuilding its initial state.

What the browser needs to recover#

A server can send HTML that a reader sees immediately. To make that page interactive, frameworks such as React can run the application again in the browser. This step, called hydration, recovers where components start and end, their state, and which events they handle.

How a page can resume#

A resumable framework writes the information the browser needs into the HTML it sends. The paper examines how early implementations approach this task and why supporting it is a framework design decision. Some implementations can also split the application’s code into pieces automatically.

Original paper

Resumability — A New Primitive for Developing Web Applications

Original abstract

Hydration is a common technique employed by current JavaScript-based frontend frameworks, such as React. In hydration, the application code is re-executed on the client to recover component boundaries, application state, and event listeners. In this article, we look into a new primitive called resumability that avoids thework as the necessary information is serialized into HTML. The idea has been adopted by Asta (2023), Google Wiz, Marko (planned for version 6 [1]), Sidewind (since 2022), and Qwik (2021) as a main building block. Resumability gives these solutions unique advantages by avoiding the cost of hydration. Furthermore, resumability can allow developers to leverage code-splitting out of the box, depending on the implementation. The shift has implications for both developer and user experience. This article aims to understand why resumability matters and why it is a good option for replacing earlier hydration-based approaches. We also consider challenges related to adopting resumability on a framework level and briefly highlight the first resumable solutions for developing web applications.