Menu

gitpiper

getProtocol javascript Code Snippet in 2024

browserbeginner

Last Updated: 23 July 2024

Gets the protocol being used on the current page.

  • Use Window.location.protocol to get the protocol (http: or https:) of the current page.
const getProtocol = () => window.location.protocol;
getProtocol(); // 'https:'

javascript snippet similar to getProtocol For You in July 2024

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️

© 2024 GitPiper. All rights reserved

Rackpiper Technology Inc

Company

About UsBlogContact

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️