Skip to main content
zerotal

Documentation


Documentation / @zerotal/inertia / clearHistory

Function: clearHistory()

clearHistory(): void

Defined in: inertia/src/historyState.ts:69

Clear any previously encrypted history state — call on logout so cached page data can't be recovered via the browser Back button.

Returns

void

Example

async destroy(http: HttpContext): Promise<void> {
  await Auth.logout();
  Inertia.clearHistory();
  return redirect('/login');
}