Skip to content

Compared to Next.js ​

Next.jsInertia Static
export const revalidate = 60 / getStaticProps({ revalidate })->isr(revalidate: 60) on the route, or ->revalidate(60) on the Inertia response
expireTime / cacheLife({ revalidate, expire })revalidate + expire (stale-while-revalidate = expire - revalidate)
generateStaticParams / getStaticPathsa StaticPathsProvider class (paths:)
revalidateTag('posts')StaticCache::purgeTags('posts')
revalidatePath('/blog')StaticCache::purgeUrls('/blog') / StaticCache::purgePrefix('/blog')
revalidateTag(tag, 'max') / updateTag(tag)PurgeMode::Soft / PurgeMode::Hard (StaticCache::purgeTags($tag, PurgeMode::Hard))
implicit _N_T_ path tagsimplicit _IST_/…/ path tags
draftMode()StaticCache::enablePreview() / StaticCache::isPreview()
cookies() / headers() opt a route out of staticleak detector: throw in development, auto in production (the route becomes dynamic)
/_next/data/{buildId}/{path}.json/__inertia/{assetVersion}/{path}.json
buildId / deployment skew protectionInertia asset version in the JSON URL + 409 full reload
x-nextjs-cache: HIT/MISS/STALEX-Inertia-Static: MISS (origin decision) + your CDN's status header
incremental cache on the originthe CDN is the cache; the origin only renders

The main difference: Next.js revalidation invalidates its own origin-side cache, and revalidateTag / revalidatePath do not purge your CDN. Inertia Static has no origin cache: the CDN is the cache, so purges go straight to the CDN, through a queue with batching and rate limits.

Public internal routes ​

Next.jsPurposeInertia Static
/_next/data/{buildId}/{path}.jsonpage data (Pages Router)/__inertia/{assetVersion}/{path}.json
/{path}.rsc, /{path}.segments/…RSC payload / segment prefetch (App Router)the same page JSON URL
/{path}?_rsc={hash} + RSC: 1dynamic navigation/__inertia/live/{assetVersion}/{path}.json (never cached)
/_next/image?url=…image optimizer—
POST {page} + Next-ActionServer Actionsyour regular Laravel routes

Like Next.js with _rsc, the page JSON gets its own URL instead of relying on the Vary header, which some CDNs ignore. The JSON URL only answers GET for isr / static routes (404 otherwise) and returns what the public HTML page already shows; only the never-cached live URL reads the session, to return the visitor's own form errors and flash data.

Released under the MIT License.