Languages
[Edit]
EN

JavaScript - get used protocol name

0 points
Created by:
Saim-Mccullough
388

In this article, we would like to show you how to get used protocol name in JavaScript.

Quick solution:

// ONLINE-RUNNER:browser;

const protocol = window.location.protocol;

console.log(protocol); // https:

References

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join