I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Unisciti a noi e traducilo tu stesso.
Puoi anche consultare l’articolo in English (US).

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The URLUtilsReadOnly.protocol read-only property returns a DOMString containing the protocol scheme of the URL, including the final ':'.

Syntax

string = object.protocol;

Examples

// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.href
var result = window.self.protocol; // Returns:'https:'

Specifications

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

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No No3.5 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No No4 No No No

See also

Tag del documento e collaboratori

Hanno collaborato alla realizzazione di questa pagina: connorshea, teoli, namolmes
Ultima modifica di: connorshea,