Window.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.

The Window.URL property returns a URL object that provides static methods used for creating and managing object URLs.

It is good practice to call the URL constructor instead of using this property.

Syntax

url = window.URL;

Specification

Specification Status Comment
URL
The definition of 'URL' in that specification.
Living Standard Initial definition

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 8.0[2] 4.0 (2.0)[1]
19.0 (19.0)
10.0 15.0[2] 6.0[2]
7.0
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes)[2] 14.0 (14.0)[1]
19.0 (19.0)
(Yes) 15.0[2] 6.0[2]

[1] From Gecko 2 (Firefox 4) to Gecko 18 included, Gecko returned an object with the non-standard nsIDOMMozURLProperty internal type. In practice, this didn't make any difference.

[2] Implemented under the non-standard name webkitURL.

Document Tags and Contributors

Contributors to this page: Sebastianz, fscholz, jsx, trevorh, indolering, teoli, Rik, kscarfone, Sheppy, makkes
Last updated by: Sebastianz,
Hide Sidebar