Fetch API
The redirect read-only property of the Request interface contains the mode for how redirects are handled.
Value
A RequestRedirect enum value, which can be one of the following strings:
followerrormanual
If not specified when the request is created, it takes the default value of follow.
Examples
In the following snippet, we create a new request using the Request.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;
Specifications
Browser compatibility
See also
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
