Search.../

protocol

Gets the protocol of the current page's URL.

Description

Premium sites: Premium site protocol

Free sites: Free site protocol

Type:

stringRead Only

Was this helpful?

Get the protocol of the current page's URL

Copy Code
1import wixLocationFrontend from 'wix-location-frontend';
2
3// Premium site URL: "https://www.domain.com/animals/elephant?species=african-elephant#desc"
4// Free site URL: "https://user_name.wixsite.com/zoo/animals/elephant?species=african-elephant#desc"
5
6
7let protocol = wixLocationFrontend.protocol; // "https"