SSR / Pages that work without JavaScript

What it costs

Measured on domains-plus (vite build, the client's one chunk, gzip -9; the served /?q=acme), against Solid 2's form enhancement on the same app, about 1 KB:

PieceClient JavaScript, minified / gzippedHTML of /?q=acme, gzipped
Everything shown in the HTML+0.1 KB / 0+3.0 KB (the prices' markup, and the envelope +1.4 KB)
Search and filters as a GET, scripting: none styles+2.9 KB / +0.9 KB+4.5 KB (the TLD select's 557 options 4.1 KB, the new rules 0.35 KB)
Paging links+0.7 KB / +0.1 KB+0.2 KB
The cart through fallback: 'server'+0.8 KB / +0.1 KB+1.4 KB (the forms, their hidden Message fields and their bindings, the plain cart)
foldkit-ssr and foldkit-mixins' changes+0.8 KB / +0.3 KBnone
All+5.2 KB / +1.4 KB+9.1 KB: 18.7 KB to 27.8 KB

The cart row is the one that compares with Solid's: the runtime already answers a form's submit, and the server writes the fallback, so a form that posts without scripts costs the browser about 0.1 KB.

The bundle stays one chunk, and the scripted page loads nothing new after boot. The largest cost is HTML: a TLD select a page without scripts can use lists every extension. A page that must stay small would offer a text field there instead.

Limits

  • What a redirected post's page shows of the post is only what its cookie carries: a refusal or a validation message needs a one-shot cookie of the application's, written in headers and read in prepare.
  • A form's busy state is not yet tied to its write being answered (#387).