web api static method
URL: revokeObjectURL() static method
Available in workers
The revokeObjectURL() static method of the URL interface
releases an existing object URL which was previously created by calling
URL.createObjectURL().
For more information, see blob URLs.
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.
If the objectURL argument passed is not a currently-active object URL — for example if it is an invalid URL, non-object URL, or is already revoked — then calling this method does nothing.
[!NOTE] This method is not available in Service Workers, due to issues with the
Blobinterface’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().
- : A string representing an object URL that was previously created by
calling
Return value
None (undefined).
Examples
See Using object URLs to display images.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.