Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cwray-tech's avatar

How do I Force Inertia to do a Hard Refresh with New Version

I am trying to figure out how to force Inertia to do a hard refresh when the version of the app is updated.

From looking at the docs, it looks like this happens by default: https://inertiajs.com/asset-versioning

Although my version method is set in the HandleInertiaRequests middleware, and I can see that the version is being passed to the frontend, the app is not performing hard page loads when a new version is released.

I'm using vite for compiling assets.

0 likes
2 replies
jlrdw's avatar

From looking at the docs, it looks like this happens by default: ...

Are you referring to:

  • A new inertia version
  • Updated assets

If inertia the link you have deals with assets.

Sorry if I don't fully understand what you mean.

Niush's avatar

Are you using ASSET_URL ( i.e. config('app.asset_url') ) ??

If so, you might need to update HandleInertiaRequests@version to check differently.

Please or to participate in this conversation.