A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/Location/protocol below:

Location: protocol property - Web APIs

Location: protocol property

Baseline Widely available

The protocol property of the Location interface is a string containing the protocol or scheme of the location's URL, including the final ":".

This property can be set to change the protocol of the URL. A ":" is appended to the provided string if not provided. The provided scheme has to be compatible with the rest of the URL to be considered valid.

See URL.protocol for more information.

Value

A string.

Examples
// Let's an <a id="myAnchor" href="https://developer.mozilla.org/en-US/Location.protocol"> element be in the document
const anchor = document.getElementById("myAnchor");
const result = anchor.protocol; // Returns:'https:'
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3