This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
Note: This feature is available in Web Workers.
The redirect read-only property of the Request interface contains the mode for how redirects are handled.
A RequestRedirect enum value, which can be one the following strings:
followerrormanualIf not specified when the request is created, it takes the default value of follow.
In the following snippet, we create a new request using the Request() constructor (for an image file in the same directory as the script), then save the request redirect value in a variable:
const myRequest = new Request("flowers.jpg");
const myCred = myRequest.redirect;
| Specification |
|---|
| Fetch> # ref-for-dom-request-redirect②> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
redirect |
46 | 14 | 43 | 33 | 10.1 | 46 | 43 | 33 | 10.3 | 5.0 | 46 | 10.3 |
© 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/Request/redirect