---
title: "offline.tt Template"
url: "https://docs.chinaski.net/en/theming/offline-tt/"
type: "page"
language: "en"
description: "Understand offline.tt, the template behind the PWA offline fallback page: what it renders, the noindex behavior, and when it is built."
updated: "2026-09-29"
generated: "Markdown rendition of the HTML page at url, built by Chinaski"
---

# offline.tt Template

`offline.tt` generates the PWA’s **offline fallback page** (`/<lang>/offline.html`), built per language only when PWA mode is enabled. It’s the destination the service worker serves when a visitor requests a page that’s neither fresh online nor cached.

## What it renders

- The **offline title** and **offline message** from your PWA settings: the page’s only content knobs (an h1 plus a paragraph, rendered with the site theme’s header/footer partials, navigation, sidebar snapshot, and org contact details).
- A **Return-home link** back to the language’s root URL.
- The page is **explicitly noindex**; an offline fallback never belongs in sitemaps or search listings.
- RTL handling included (writing direction honored per language, like all site templates).

## How it works in practice

Built at build time as one of the PWA artifacts (alongside `manifest.json` and `sw.js`), the page is listed in the service worker’s **precache list**, so every visitor who has loaded the site once carries it, and the worker routes there when a navigation can’t be served fresh or from cache.

Settings changes (title, message) trigger the usual rebuild; the offline page regenerates with the PWA’s other artifacts. Each language gets its own page: title/message in that language per overrides, writing direction handled automatically.

## Theme behavior

- The template references the standard search rules (theme directory first, built-in fallback) and your theme’s stylesheets/complexion, the same classes and partials as every built page.
- To completely restyle it for your theme, override `offline.tt` (maintain the same template contract: a `title` plus `offline_message` stash and the standard head/header/footer route order; keep the noindex flag): the message content area is what visitors see.

## Not to be confused with

- The **404 page**: a different utility page (served for genuinely missing paths; offline.tt exists only for PWA offline routing).
- A general host fallback: the hosting examples feed `/offline.html` only as a PWA route; if your hosting has its own 404 route, keeping offline.html as a separate PWA fallback preserves both behaviors.
