About the Head Appender API

The Head Appender API adds HTML to the head of the page, such as preload links and styles. Use it for markup that has to be in the page before the browser renders the body, so resources start loading early and styles apply from the first paint.

With the Head Appender API, you can:

  • Add preload links, so the browser starts fetching fonts, modules, and other resources while it parses the page.
  • Add styles that apply before the page renders.
  • Choose the type of head content, which the host uses to decide where to place it.

Use cases

SDK setup

@wix/site-service-head-appender

To use the API, install the @wix/site-service-head-appender package:

Copy

Import the package

Copy

Import types

Import any type shown in these docs from @wix/site-service-head-appender/types:

Copy

Resolve the service

In a React component, resolve the service with the useService hook:

Copy

Last updated: 21 October 2026

Did this help?