---
title: "Lazy Head"
description: "Defer the Unhead DOM runtime in a server-rendered Solid app."
canonical_url: "https://unhead.unjs.io/docs/solid-js/head/guides/core-concepts/lazy-head"
---

> Index of every page on this site: [llms.txt](https://unhead.unjs.io/llms.txt)

The lazy head keeps the server tags in place and queues client updates until your app calls `head.load()`.

<note>

The lazy head is experimental. Its API may change in a minor release.

</note>

## Set up the client entry

Start with the [Solid SSR setup](https://unhead.unjs.io/docs/solid-js/head/guides/get-started/installation). Import from `@unhead/solid-js/lazy` in the client entry. Keep your server entry and existing `useHead()` calls.

```tsx [src/entry-client.tsx]
import { createHead, UnheadContext } from '@unhead/solid-js/lazy'
import { hydrate } from 'solid-js/web'
import App from './App'

const head = createHead()

hydrate(
  () => <UnheadContext.Provider value={head}><App /></UnheadContext.Provider>,
  document.getElementById('root')!,
)
head.finishHydration()
```

Call `finishHydration()` once the initial components have registered their head entries. If your app hydrates an async subtree later, wait for its initial entries too.

## Choose when to load

Call `await head.load()` when the app needs to apply queued entries. For example, call it after the destination page mounts on the first navigation. Call it after hydration if the initial page needs a client-only tag. Later updates reach the document through the loaded client head.

## Use streaming SSR

Keep the [streaming server entry](https://unhead.unjs.io/docs/solid-js/head/guides/core-concepts/streaming). Set `Unhead({ streaming: { mode: 'manual' } })` in the Vite plugin. This keeps the streaming transforms and lets the app load the client runtime.

Pass the server's stream key to `createHead({ streamKey: '__unhead__' })`. Call `load()` once the server bootstrap is present if you need to apply streamed patches. Call `head.discardStream()` when leaving the initial page so late patches from that page are ignored.

See the [lazy head API](https://unhead.unjs.io/docs/head/api/lazy-head) for options, preloads, and load errors.

## Sitemap

See the full [sitemap](https://unhead.unjs.io/sitemap.md) for all pages.
