2 ms·
That adds an additional network request.
by throwitaway1123 3y ago
That adds an additional network request.
- niutech 3y agoNo, the CSS is being requested only once and cached in the browser, subsequent requests are being served from browser cache.
- throwitaway1123 3y agoThe browser cache doesn't help on the first visit when the cache is empty, and the cache will also have to be invalidated whenever the component's CSS changes. And if the CSS file isn't cached then you also have to contend with the flash of unstyled content problem while the browser loads the CSS file. The Lit docs do a good job of explaining this: https://lit.dev/docs/components/styles/#external-stylesheet https://lit.dev/docs/components/styles/#external-stylesheet