We need an Open Source alternative to AMP.
Fastest experience possible for SPA's (or pages) on both Mobile and Desktop.
- tcp segment size (MSS) default is 536B
- 1KB single ethernet packet
- 14KB single roundtrip (first frame is 1460B)
- 65kb upper bound for single frame
- Must fit in one request - TCP/HTTP connections are expensive (HTTP2 is not an option)
- Must support noscript users (Accesibility, TOR, etc.)
- Minimal time to first render
- ...and second, and third
- No FOUC/FOUT (must use system fonts)
- Initial UI - the first thing a user sees, fits into first 500 bytes
- Full SPA UI - the fully functioning SPA, preferably fits into 14KB, or else 65KB
In the same page (in this order) (same TCP connection):
- Load initial UI ( < 500 bytes)
- Include noscript tag with redirect
- Include a comment tag, containing the full SPA UI with all content and assets inlined
- Include an inline script tag, which extracts the contents of the content tag and injects them into the page
- done.
To assist in fitting initial UI into 500 bytes, convert CSS class styles into inline styles (in initial UI)