{{ApiRef("URL")}}{{SeeCompatTable}}
Summary
The URL.revokeObjectURL()
static method releases an existing object URL which was previously created by calling {{domxref("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.
{{AvailableInWorkers}}
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[1] | {{CompatGeckoDesktop(2.0)}} | 10.0 | 15.0 | 6.0[1] 7.0 |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}}[1] | {{CompatGeckoMobile(14.0)}} | {{CompatVersionUnknown}} | 15.0 | 6.0[1] 7.0 |
[1] Implemented with URL
prefixed as webkitURL
.
See also
- {{domxref("URL.createObjectURL()") }}
- Using files from web applications