[]previous and next page

Resource hints

preconnect, prefetchDNS, preload, preloadModule, preinit and preinitModule from @shadow-js/web tell the browser about resources the page will need.

For agentsUpdated

preconnect, prefetchDNS, preload, preloadModule, preinit and preinitModule from @shadow-js/web tell the browser about resources the page will need. They can be called in a component, in an event handler, or at module scope on the client. Each hint is added to the document head once. On the server, a hint called during a render joins the head collector of that render (see createServerHead), so it appears in the response. Only http(s) and relative URLs are accepted; anything else throws a TypeError. A preinit script becomes a preload on the server, because head tags cannot be scripts, and preinitModule becomes a modulepreload.