sveltejs/svelte-hackernews

Embedding the bundle.js and styles into html

Opened this issue · 0 comments

codri commented

Hi,

By the looks of it, embedding the bundle.js(8.2KB), main.css(1.5KB) into the document(3.1KB) can easily fit into the 14KB sweet spot(12.8KB in total, maybe even better when gzipped together).

It could show one of the sveltejs main selling points, its compactness. The webfonts, of course, will slow down the things, but I think there are ways to progressively add webfonts to the page(maybe even without triggering a layout recalculation) while rendering initially without them.

One could also draw some dummy elements on the screen, then once the data comes from the server, it could add the text and images into places.

It's a crowded place these days for webframeworks so achieving 100 score on lighthouse could attract more people. Shaving off a few roundtrips on 2G on mobile could result in a higher score.

Resources about the 14KB TCP slow start window:

Link for the progressive web fonts loading(hacks of course):