URL: revokeObjectURL() static method
The 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.
Note: This method is not available from service workers, due to issues with the Blob
interface's life cycle and the potential for leaks.
Syntax
URL.revokeObjectURL(objectURL)
Parameters
-
objectURL
-
A string representing an object URL that was previously created by calling createObjectURL()
.
Return value
Examples
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
revokeObjectURL_static |
19 |
12 |
19revokeObjectURL() is no longer available within the context of a ServiceWorker .
|
10 |
15 |
6 |
4.4 |
25 |
19revokeObjectURL() is no longer available within the context of a ServiceWorker .
|
14 |
6 |
1.5 |
See also