Performance: svelte:head for document head
MEDIUM IMPACT
This affects the page's initial load speed and SEO by managing the document head elements efficiently.
<svelte:head><title>Page Title</title><meta name="description" content="Page description" /></svelte:head>
<script>document.title = 'Page Title'; document.head.appendChild(document.createElement('meta'));</script>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Imperative document.head manipulation | Multiple DOM insertions at runtime | Triggers 1+ reflows | Increases paint time | [X] Bad |
| Declarative <svelte:head> usage | Head elements included in SSR or hydration | No extra reflows | Minimal paint impact | [OK] Good |