Interface History

    Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.

    MDN Reference

    interface History {
        length: number;
        scrollRestoration: ScrollRestoration;
        state: any;
        back(): void;
        forward(): void;
        go(delta?: number): void;
        pushState(data: any, unused: string, url?: string | URL): void;
        replaceState(data: any, unused: string, url?: string | URL): void;
    }

    Properties

    length: number
    scrollRestoration: ScrollRestoration
    state: any

    Methods

    • Parameters

      • Optionaldelta: number

      Returns void

    • Parameters

      • data: any
      • unused: string
      • Optionalurl: string | URL

      Returns void

    • Parameters

      • data: any
      • unused: string
      • Optionalurl: string | URL

      Returns void