files/en-us/web/api/url/revokeobjecturl_static/index.md
{{APIRef("File API")}} {{AvailableInWorkers("window_and_worker_except_service")}}
The revokeObjectURL() static method of the {{domxref("URL")}} interface
releases an existing object URL which was previously created by calling
{{domxref("URL.createObjectURL_static", "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 {{domxref("Blob")}} interface's life cycle and the potential for leaks.
URL.revokeObjectURL(objectURL)
objectURL
None ({{jsxref("undefined")}}).
See Using object URLs to display images.
{{Specifications}}
{{Compat}}