Asset versioning
Purpose
Section titled “Purpose”When you deploy new frontend assets, Inertia clients should hard-reload so they do not mix old JS with new props. The server exposes a version string; clients send X-Inertia-Version on visits.
Setting the version
Section titled “Setting the version”Inertia.version("1")// or config inertia.version// or middleware override fun version(request) = assetHash()Conflict rules
Section titled “Conflict rules”versionConflict(request) returns a 409 response when all of:
- Request is an Inertia request (
X-Inertiapresent) - Client sent
X-Inertia-Version - Manager
versionis non-empty - Client version ≠ server version
The 409 body is empty; headers include X-Inertia: true. Middleware then decorates so X-Inertia-Version matches the server.
If the server version is empty, conflicts are not raised (clients may omit the header freely).