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 feature is available in Web Workers.

Syntax

window.URL.revokeObjectURL(objectURL);

Parameters

objectURL
A DOMString representing a object URL that was previously created by calling createObjectURL().

Return value

undefined.

Example

See Using object URLs to display images.

Specification

Specification Status Comment
File API
The definition of 'revokeObjectURL()' in that specification.
Working Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support

81

Yes

1241015

7

61

FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? ? ? ? ? ? ?

1. Supported as webkitURL.

See also

Document Tags and Contributors

Last updated by: Sheppy,