javascript how to know if site is secure 1

javascript how to know if site is secure

if (location.protocol === 'https:') {
    // page is secure
}

Here is what the above code is Doing:
1. We’re checking to see if the protocol is https.
2. If it is, we’re going to do something.

Similar Posts