GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

serviceworker

The serviceworker member specifies a serviceworker that is Just-In-Time (JIT)-installed and registered to run a web-based payment app providing a payment mechanism for a specified payment method in a merchant website. See for more details.

The `serviceworker` member specifies a serviceworker that is Just-In-Time (JIT)-installed and registered to run a web-based payment app providing a payment mechanism for a specified payment method in a merchant website. See for more details.

## Values

`serviceworker` objects may contain the following values:

- `scope`
- : A string representing the service worker's registration scope.

- `src`
- : A string representing the URL to download the service worker script from.

- `use_cache`
- : A boolean that sets how the HTTP cache is used for service worker script resources during updates.
It provides equivalent functionality to certain values of the `updateViaCache` option provided when a service worker is registered via JavaScript using ServiceWorkerContainer.register().
- `true`: The HTTP cache will be queried for imports, but the main script will always be updated from the network. If no fresh entry is found in the HTTP cache for the imports, they're fetched from the network. Equivalent to `updateViaCache: "imports"`.
- `false`: The HTTP cache will not be used for the main script or its imports. All service worker script resources will be updated from the network. Equivalent to `updateViaCache: "none"`.

## Examples

See [Web-based Payment Handler API > Concepts and usage](/docs/Web/API/Web-Based_Payment_Handler_API#concepts_and_usage).

## Specifications

## Browser compatibility

## See also

- Service Worker API
-
- [Web-based payment apps overview](https://web.dev/articles/web-based-payment-apps-overview)
- [Setting up a payment method](https://web.dev/articles/setting-up-a-payment-method)
- [Life of a payment transaction](https://web.dev/articles/life-of-a-payment-transaction)
- [Using the Payment Request API](/docs/Web/API/Payment_Request_API/Using_the_Payment_Request_API)
- [Payment processing concepts](/docs/Web/API/Payment_Request_API/Concepts)

source: MDN Web Docs mirror · page

Cite this

"serviceworker". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/serviceworker

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·