Skip to main content

Type Alias: RegisterServiceWorkerOptions

RegisterServiceWorkerOptions = object

Defined in: registerServiceWorker.ts:69

Properties​

config?​

optional config?: Partial<ServiceWorkerConfig>

Defined in: registerServiceWorker.ts:78

Passed to the worker through the script URL.


enabled?​

optional enabled?: boolean

Defined in: registerServiceWorker.ts:84

When false, unregisters every worker and clears every cache instead of registering. Defaults to true everywhere but localhost; apps usually pass their production check too.


url?​

optional url?: string

Defined in: registerServiceWorker.ts:74

Script URL. It must sit at the origin root (or be served with a Service-Worker-Allowed header) to control every page.