Easy Tutorial
❮ Prop Video Currentsrc Met Audio Play ❯

protocol Attribute in Location


Definition and Usage

The protocol attribute is a read-write string that can be set or returns the protocol of the current URL.

Syntax


Browser Support

All major browsers support the protocol attribute.


Example

Return the protocol part of the current URL:

The output of the above example:


❮ Prop Video Currentsrc Met Audio Play ❯