How it works

Discover, preload, intercept, swap – four moves, zero ceremony.

Sparke does four things, in order, with no diffing, no virtual DOM and no hydration. The whole library is a single file that wires these four moves together.

Every page in these docs is served by Sparke. As you click through the steps below, the navigation itself is the demo – instant, from memory.

One context, kept alive

The single behavioural difference from a normal MPA: Sparke keeps the JavaScript context alive across navigations instead of throwing it away on each page load. That's what makes swaps instant – and it's the one thing to keep in mind when migrating an existing site.