Page 1 of 1

How to find out what protocol is used to connect to the site

Posted: Thu Feb 04, 2021 9:09 am
by miasoft
How to find out what protocol is used to connect to the site (SSL or not)?

Re: How to find out what protocol is used to connect to the

Posted: Thu Feb 04, 2021 9:12 am
by kev1n
How do you connect? Can you give a little more detail?

Re: How to find out what protocol is used to connect to the

Posted: Thu Feb 04, 2021 10:09 am
by miasoft
I have two different links:
for SSL - https://xx.xx.yy.zzz:8001/proj/
not SSL - http://xx.xx.yy.zzz:8000/proj/

The user knows which link to choose: SSL with full functionality or notSSL with minimum.
I would like to programmatically restrict functionality, issue messages, warnings, etc.

Re: How to find out what protocol is used to connect to the

Posted: Thu Feb 04, 2021 10:42 am
by kev1n
The JavaScript

Code: Select all

location.protocol
returns the protocol of the current URL.

Re: How to find out what protocol is used to connect to the

Posted: Thu Feb 04, 2021 11:04 am
by miasoft
kev1n wrote:The JavaScript

Code: Select all

location.protocol
returns the protocol of the current URL.
Thanks, kev1n!