protocol


protocolstringRead-only

Gets the protocol of the current page's URL.

Premium sites: Premium site protocol

Free sites: Free site protocol

Get the protocol of the current page's URL
JavaScript
import wixLocationFrontend from "wix-location-frontend"; // Premium site URL: "https://www.domain.com/animals/elephant?species=african-elephant#desc" // Free site URL: "https://user_name.wixsite.com/zoo/animals/elephant?species=african-elephant#desc" let protocol = wixLocationFrontend.protocol; // "https"
Did this help?