Methods

disable

static

disable()

If the browser supports Navigation Preload, then this will disable it.

enable

static

enable(headerValue)

If the browser supports Navigation Preload, then this will enable it.

Parameter

headerValue

Optional

string

Optionally, allows developers to override the value of the Service-Worker-Navigation-Preload header which will be sent to the server when making the navigation request.

isSupported

static

isSupported() returns boolean

Returns

boolean Whether or not the current browser supports enabling navigation preload.