Install guide

Install LightLoader in under five minutes

One script tag, any platform. Pick your stack below, paste the snippet, and your pages start loading faster on the next visit.

Quick start

  1. Create your account and register the domain you want to speed up.
  2. Copy your personal script tag. Your token is already filled in.
  3. Paste it just before the closing </head> tag on every page.
Your script tag
<script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>

Replace YOUR_TOKEN

The snippet above is an example. Use the one from your account, which includes your unique token.

Install by platform

Exact steps for the most common website platforms and builders.

HTML / any website

Works on any site where you can edit the page template.

  1. Open the template or layout file shared by every page.
  2. Paste the script tag just before the closing </head> tag.
  3. Save and deploy. LightLoader starts optimizing on the next page view.
index.html
<head>
  <!-- ...your existing tags... -->
  <script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>
</head>

WordPress

Use your theme's header or a header-scripts plugin.

  1. In your dashboard, install a header and footer scripts plugin such as WPCode, or open Appearance → Theme File Editor.
  2. Add the script to the site-wide header section, or paste it before </head> in header.php.
  3. Clear any page cache from caching plugins so visitors receive the updated HTML.
Header scripts
<script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>

Shopify

Add one line to your theme layout.

  1. Go to Online Store → Themes, then choose Edit code on your live theme.
  2. Open layout/theme.liquid.
  3. Paste the script just before the closing </head> tag and save.
theme.liquid
<script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>

Webflow

Use site-wide custom code.

  1. Open Site settings → Custom code.
  2. Paste the script into the Head code field.
  3. Save, then publish your site for the change to go live.
Head code
<script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>

Next.js

Load it once from your root layout.

  1. Open app/layout.tsx, or pages/_app.tsx if you use the Pages Router.
  2. Import Script from next/script and render it inside the layout.
  3. Deploy. The script loads on every route, including client-side navigations.
app/layout.tsx
import Script from "next/script"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN"
          strategy="afterInteractive"
        />
      </body>
    </html>
  )
}

Squarespace & Wix

Both support site-wide header code on paid plans.

  1. Squarespace: Settings → Advanced → Code Injection, then paste into the Header field.
  2. Wix: Settings → Custom Code → Add Custom Code, choose All pages and place it in Head.
  3. Save and publish.
Header code
<script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>

Google Tag Manager

Deploy without touching site code.

  1. Create a new tag of type Custom HTML and paste the script.
  2. Set the trigger to Initialization - All Pages so it fires as early as possible.
  3. Preview to confirm it fires, then submit and publish the container.
Custom HTML tag
<script src="https://app.lightloader.com/api/loader.js?token=YOUR_TOKEN" async></script>

Verify your install

  1. Open your site in a private browser window.
  2. Open DevTools, go to the Network tab, and filter by loader.js. You should see a 200 response.
  3. Run PageSpeed Insights before and after so you can compare results.

Field data takes time

Lab scores improve right away. Google's real-user data in Search Console updates over a rolling 28-day window.

Troubleshooting

The script is installed but nothing changed
Clear your site and CDN cache, then load the page in a private window. Most hosts and caching plugins serve old HTML until the cache is purged.
I see a token error in the console
Make sure the token in the script matches the one shown in your account, and that the domain you are testing on is the domain you registered.
My site uses a Content Security Policy
Add https://app.lightloader.com to your script-src and connect-src directives.
Can I test on a staging site first?
Yes. Contact support to add a staging domain to your account so you can verify results before going live.

Still stuck? Contact support and we'll help you get set up.

Start optimizing in minutes

Ready to supercharge your website?

Join thousands of websites already using LightLoader to deliver lightning-fast experiences to their users.

No credit card required. Free plan available.

  • Quick Setup

    Install in under 5 minutes

  • Works Everywhere

    Compatible with any platform

  • Instant Results

    See improvements immediately