Feature

Lazy loading

An icon's file is requested when the icon nears the viewport, through the browser's own loading="lazy". Scroll down and watch the request log fill up.

How

Each <fast-svg> whose icon is not cached yet appends a hidden <img loading="lazy"> pointing at the file. The browser decides when to fetch it. On load the registry fetches the same URL, which hits the HTTP cache, parses it and caches it in the DOM.

This list is rendered only in the browser so the prerendered HTML does not already contain the icons. The icons use the lazy/ scope so they are not served from the cache another page filled.