Is there a way to check in JavaScript if given a host its SSL certificate is valid? (non blocking)
In my case, I want to display: "you can also use https://.." if via JavaScript I can make a request to https://my_url without being asked to accept an untrusted certificate.
Can this be done asynchronously?
The question doesn’t make sense. You can’t get the server’s SSL certificate without opening an SSL connection to it, and once you’ve done that, telling the user they can do that too is a bit pointless.