Protocol support
The adapter implements the Inertia.js v3 protocol, and the lists below say which parts.
Core protocol
- HTML on the first visit and JSON on Inertia visits, both from
c.var.inertia.render() - Lazy function props that run only when the response includes them
Vary: X-Inertiaon every response- Asset versioning with a 409 and
X-Inertia-Locationon a version mismatch for GET requests, using the Vite plugin ormanifestVersion - 302 to 303 conversion after PUT, PATCH, DELETE and QUERY on Inertia requests
- A redirect back to the
Refererwhen a handler returns an empty 200, andc.var.inertia.back()for doing it yourself - Shared props with the
shareoption and per request withc.var.inertia.share() - Partial reloads with
X-Inertia-Partial-DataandX-Inertia-Partial-Except. Excluded props never run, anderrorsis always included - Validation errors from the session with
withErrors(), shared aserrorsand encoded as{}when empty - Error bags with
X-Inertia-Error-Bag, following Laravel's rules - Flash data kept across redirects and version mismatches with the
sessionoption - Prop reset with
X-Inertia-Reset - Fragment redirects. A redirect to a URL with
#becomes a 409 withX-Inertia-Redirect, andpreserveFragment()keeps the request's fragment - Custom status codes with
c.status()before rendering - XSS-safe page embedding with
serializePage
Optional features
- Always props with
always - Optional props with
optional - Deferred props with
deferred, including groups - Rescued deferred props with
deferred(fn).rescue(), which reports errors toonRescue - Merge props with
merge,prependanddeepMerge - Match keys and merge paths for merged props with
matchOn(),append(path)andprepend(path) - Infinite scroll with
scrollandX-Inertia-Infinite-Scroll-Merge-Intent - Once props with
once, including keys, expiry andX-Inertia-Except-Once-Props - Combined prop types, such as
deferred(fn).merge().once() - Nested props: prop types and lazy functions inside objects, and dot paths in partial reloads
- Live props with
live()or.live(),broadcastProperties()andsocketId()(client 3.11+) - Precognition with
inertiaValidator(), which takes any Standard Schema such as Zod, Valibot or ArkType - External redirects with
c.var.inertia.location() - Flash data with
c.var.inertia.flash() - History encryption with
encryptHistory() - History clearing with
clearHistory(), which also works when the handler redirects - Server-side rendering in the same process or through an Inertia SSR server, with a fallback to client rendering reported to
onSsrError - BigInt props with
preserveBigIntegers - Server-provided head elements with the
headprop - View data for the root template that stays out of the page object, with
viewData() - DevTools protocol with the
devtoolsoption Cache-Controlon adapter responses with thecacheControloption- Testing helpers in
@brachkow/hono-inertia/testing