Mozilla's getting a new look. What do you think? https://mzl.la/brandsurvey

window.URL.revokeObjectURL Redirect 1

« DOM Reference « URL

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

Summary

The URL.revokeObjectURL() static method releases an existing object URL which was previously created by calling 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 DOMString representing the object URL that was created by calling URL.createObjectURL().

Example

See Using object URLs to display images.

Specification

Specification Status Comment
File API Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 8.0 with URL prefixed as webkitURL 4.0 (2.0) 10.0 15.0 with URL prefixed as webkitURL 6.0 with URL prefixed as webkitURL
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) with URL prefixed as webkitURL 14.0 (14.0) (Yes) 15.0 with URL prefixed as webkitURL 6.0 with URL prefixed as webkitURL

See also

Document Tags and Contributors

 Last updated by: Sheppy,