Type Alias ThirdPartyConfig
type ThirdPartyConfig = {
allow: string[];
allowOpaque?: boolean;
maxEntries?: number;
revalidateAfterMs?: number;
versioned?: string[];
}
allow: string[];
allowOpaque?: boolean;
maxEntries?: number;
revalidateAfterMs?: number;
versioned?: string[];
}
Properties
allow
allow: string[]
origins whose GET requests the worker may answer from its copy, such as https://fonts.gstatic.com
Optionalallow Opaque
allowOpaque?: boolean
keep opaque (no-cors) responses, which Chromium counts as about 7 MB each against quota; default false
Optionalmax Entries
maxEntries?: number
most files held; the oldest go first; default 64
Optionalrevalidate After Ms
revalidateAfterMs?: number
a copy of an unversioned file is checked again at a network moment once it is this old; default one day
Optionalversioned
versioned?: string[]
extra patterns, as regular expression sources, that mark a URL as versioned
The opt-in worker cache for cross-origin files. Only an origin in
allowis touched, and only a response the worker can read (a CORS answer) for a URL that looks versioned, or one the origin marks immutable, is kept. Everything else goes to the network untouched.