Web APIs

URL.revokeObjectURL()

Try the free JavaScript compiler

Releases an object URL association; it does not mutate the original Blob.

Formal Syntax & Structure

javascript syntaxjavascript
URL.revokeObjectURL(url)

Parameters & Attributes

NameTypeDescription
urlstringPreviously created URL.

Return Value

undefined

Releases an object URL association; it does not mutate the original Blob.

Working Example

Example Snippetjavascript
(async () => {const b=new Blob(["hi"]);const u=URL.createObjectURL(b);URL.revokeObjectURL(u);console.log(b.size,await b.text());})()
JavaScript Reference