Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2022.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
The enable() method of the NavigationPreloadManager interface is used to enable preloading of resources managed by the service worker. It returns a promise that resolves with undefined.
The method should be called in the service worker's activate event handler, which ensures it is called before any fetch event handler can fire.
None.
A Promise that resolves with undefined.
There is no active worker associated with the registration to which this NavigationPreloadManager belongs.
The code below shows how to enable preloading, after first using ServiceWorkerRegistration.navigationPreload to test that it is supported.
| Service Workers Nightly # dom-navigationpreloadmanager-enable |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jun 7, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.