Current
Production Docs Pre-rendering
How published production docs are saved as HTML and route data before live rendering runs
Overview
When you publish a branch, Doxa can save the public production pages of your site as HTML and route data. Readers of your live site receive these saved pages first. If a saved page is missing or cannot be read, Doxa renders that page live, so readers still see the published version.
Pre-rendering applies only to public production sites. It does not change previews, permanent generation URLs, or the access rules for those routes.
What is saved
| Saved item | Used for |
|---|---|
| Page HTML | Direct requests for a page on the published site |
| Route data | Client-side navigation between pages |
| Redirect entries | Redirects, which need no saved page to be read |
How a reader request is served
Doxa resolves the hostname of the request to your published site.
Doxa checks the saved output against the current published version.
If the saved output is valid, Doxa returns the saved HTML or route data.
If the saved output is missing or invalid, Doxa renders the page live.
Client-side navigation loads route data from the /_doxa/route-data/v1 endpoint on your site. That endpoint returns saved route data when it exists. Otherwise it builds the same data live. Route data can also be cached on first request, as described in Production Docs Caching.
When saved output is updated
Publishing a branch records the new version and queues pre-rendering for it in the same database operation. Doxa tries to start the work immediately after the publish completes.
If that immediate start fails, the work stays queued and Doxa retries it on a scheduled basis, every five minutes.
The scheduler also checks saved output for completed versions. If a saved page is missing or invalid, Doxa queues it again.
Rendering never changes what is live. If a render fails, the live renderer keeps serving the published version.
Headers and caching
Responses from the public gateway always send
Cache-Control: private, no-store.Saved output and live output send the same security header set. A reader never receives weaker headers because saved output was missing.
Valid saved output is cached for 30 days in internal layers. Missing saved output uses a 30-second fallback, so repaired output replaces the live fallback quickly.
Note:
Pre-rendering does not add instant revocation. If a site must be taken offline or hidden immediately, follow the limits described in Production Docs Caching and Storage Garbage Collection.
What this means for you
You do not change anything in the dashboard to use pre-rendering. This page does not describe a per-project setting. Rollout is controlled at the platform level.
Publish and restore work as usual. See Branches, Previews, Publishing, and Restore.
Previews and permanent generation URLs keep their current access rules and rendering paths.
Do not use this public output for private documentation. Private, preview, and unknown requests never use saved output.
Related pages
Cache behavior and invalidation limits for published sites.
How saved production HTML and route data relate to rendering.
Publish a branch and restore a prior version.
Attach a custom domain to a project.