Window location.protocol attribute
- Previous Page port
- Next Page reload()
- Go to the Previous Level Window Location
Definition and usage
protocol
Sets or returns the protocol of the current URL, including the colon (:].
This protocol is a standard used to specify the way data is transmitted between computers.
Syntax
Return the protocol attribute:
location.protocol
Set the protocol attribute:
location.protocol = protocol
Attribute value
Value | Description |
---|---|
protocol | The protocol of the URL. For example: |
Return value
Type | Description |
---|---|
String | The protocol of the current URL, including the colon (:]. |
Browser Support
All Browsers Support location.protocol:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Previous Page port
- Next Page reload()
- Go to the Previous Level Window Location