This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2022.
Note: This feature is only available in Service Workers.
The navigate() method of the WindowClient interface loads a specified URL into a controlled client page then returns a Promise that resolves to the existing WindowClient.
navigate(url)
urlThe location to navigate to.
A Promise that resolves to the existing WindowClient if the URL is from the same origin as the service worker, or null otherwise.
| Specification |
|---|
| Service Workers> # client-navigate> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
navigate |
49 | 17 | 50 | 36 | 1611.1–16This method exists, but always throwsNotSupportedError. |
49 | 50 | 36 | 1611.3–16This method exists, but always throwsNotSupportedError. |
4.0 | 42 | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WindowClient/navigate