Prefetching

Preload pages before users navigate to them.

See also

Official Inertia.js docs: Prefetching

What Is Prefetching?

Prefetching proactively loads a page in the background, so navigation feels instant when the user clicks a link.

Programmatic Prefetching

Prefetch routes from code:

import { router } from "@inertiajs/react";

router.prefetch("/users", { cacheFor: 60 });
import { router } from "@inertiajs/vue3";

router.prefetch("/users", { cacheFor: 60 });

Backend Considerations

Prefetch requests hit your existing routes. Use partial reloads to limit payload size when prefetching large pages.

See Also