docs: clarify that preloads are sent as a Link header on dynamically rendered pages#16309
Conversation
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/b54c7165e7692b619376cb6069776cfb44d83043Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
|
|
Thanks! Can you rebase this on the |
573ffdf to
7d59e63
Compare
…y rendered pages
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
c7528c9 to
0d3a6c4
Compare
closes #16139
The
preloaddocs say the selected files "should be added to the<head>tag". Since #14200 that only happens for prerendered pages. Dynamically rendered pages send aLinkresponse header instead, with no tag in the HTML.The old wording produced #16139. The reporter enabled font preloading, searched the served HTML for a
<link rel="preload" as="font">tag, and reasonably concluded the feature was broken. Running their reproduction, the font was preloaded the whole time:This updates the hooks docs and the
ResolveOptionsJSDoc to name both delivery paths.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits