{{DOMRef("URL")}}{{SeeCompatTable}}
Summary
The URL.revokeObjectURL()
static method releases an existing object URL which was previously created by calling {{domxref("window.URL.createObjectURL()") }}. Call this method when you've finished using a object URL, in order to let the browser know it doesn't need to keep the reference to the file any longer.
Syntax
window.URL.revokeObjectURL(objectURL);
- objectURL
- is a {{domxref("DOMString")}} representing the object URL that was created by calling {{domxref("URL.createObjectURL()") }}.
Example
See Using object URLs to display images.
Specification
Specification | Status | Comment |
---|---|---|
{{SpecName('File API', '#dfn-revokeObjectURL', 'URL')}} | {{Spec2('File API')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 8.0 with URL prefixed as webkitURL |
{{CompatGeckoDesktop(2.0)}} | 10.0 | 15.0 | 6.0 with URL prefixed as webkitURL 7.0 |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} with URL prefixed as webkitURL |
{{CompatGeckoMobile(14.0)}} | {{CompatVersionUnknown}} | 15.0 | 6.0 with URL prefixed as webkitURL 7.0 |
See also
- {{domxref("URL.createObjectURL()") }}
- Using files from web applications