Skip to content 2.0

Resumability and JavaScript

Author: Natalia Venditto

Date First Published: Wed Jan 04 2023

What is resumability and how it works?

Resumability proposes to have zero cost of execution, as a potential viable solution to duplication of state or replay. Instead of loading and executing JavaScript on the client-side, to enable dynamic features, the server sends the render and a serialization of both state and handlers, so basically the client can pick up or resume exactly where the server stopped the JavaScript execution.

What does pick up where the server left exactly mean in this case?

It means that because those assets (event handlers and state) are sent in a serialized form -meaning, as already explained, converted to a format that can be transferred over the wire-, the client can resume the execution of the code with the handlers as entry points, and initialize the state of the application in smaller chunks, without having to re-render the whole view or force a DOM replay.