URL.revokeObjectURL()
static method releases an existing object URL which was previously created by calling
URL.createObjectURL()
.
Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
注意:
This method is not available from service workers, due to issues with the
Blob
interface's life cycle and the potential for leaks.
URL.revokeObjectURL(objectURL)
objectURL
DOMString
representing a object URL that was previously created by calling
createObjectURL()
.
见 Using object URLs to display images .
| 规范 | 状态 | 注释 |
|---|---|---|
|
文件 API
The definition of 'revokeObjectURL()' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
revokeObjectURL
|
Chrome 19 | Edge 12 |
Firefox
19
|
IE 10 | Opera 15 | Safari 6 | WebView Android ≤37 | Chrome Android 25 |
Firefox Android
19
|
Opera Android 14 | Safari iOS 6 | Samsung Internet Android 1.5 |
完整支持
实验。期望将来行为有所改变。
见实现注意事项。
URL
createObjectURL()
revokeObjectURL()
toJSON()
toString()