A playground to locally preview Signed Exchanges without needing a certificate.
-
Compile sxg-rs to WebAssembly
cd ../cloudflare_worker && wrangler build && cd ../playground
-
Compile playground
npm install npm run build
node dist/index.js --single-url https://example.com/ --emulate-network Fast\ 3G --repeat-time 3
The output will be like below.
Measuring non-SXG LCP of https://example.com/
LCP 1 / 3: 720
LCP 2 / 3: 674
LCP 3 / 3: 636
Measuring SXG LCP of https://example.com/
LCP 1 / 3: 78
LCP 2 / 3: 95
LCP 3 / 3: 69
SXG changes LCP from 677 ± 24 to 80 ± 8