vuetify-nuxt-module
Version:
Zero-Config Nuxt Module for Vuetify
14 lines (13 loc) • 924 B
TypeScript
/**
* Session cookie marking that the one-time `reloadOnFirstRequest` reload has
* already happened this browser session. Prevents an infinite reload loop when
* a browser requests client hints but never delivers them (e.g. Brave Shields
* strip `Sec-CH-*`), since `firstRequest` would otherwise stay `true` forever (#334).
*/
export declare const RELOAD_GUARD_COOKIE = "vuetify-nuxt-client-hints-reloaded";
/** True when the guard cookie is present in a `document.cookie` string. */
export declare function hasReloadGuardCookie(cookie: string): boolean;
/** Build a session guard cookie (no expiry → cleared on browser close). */
export declare function buildReloadGuardCookie(path: string): string;
/** Whether to perform the first-request reload: only once per session. */
export declare function shouldReloadOnFirstRequest(firstRequest: boolean, reloadOnFirstRequest: boolean, alreadyReloaded: boolean): boolean;