redirect
只读特性在
Request
interface contains the mode for how redirects are handled.
var myRedirect = request.redirect;
A
RequestRedirect
enum value, which can be one the following strings:
follow
error
manual
If 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.Request()
constructor (for an image file in the same directory as the script), then save the request
redirect
value in a variable:
var myRequest = new Request('flowers.jpg');
var myCred = myRequest.redirect;
| 规范 | 状态 | 注释 |
|---|---|---|
|
Fetch
The definition of 'redirect' in that specification. |
实时标准 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
redirect
|
Chrome 46 | Edge 14 | Firefox Yes | IE No | Opera Yes | Safari No | WebView Android No | Chrome Android 46 | Firefox Android Yes | Opera Android Yes | Safari iOS No | Samsung Internet Android 5.0 |
完整支持
不支持
实验。期望将来行为有所改变。