I use CaCert certificates for my domains.
I want to redirect my users to HTTPS only if they recognised the CaCert authority.
What is the best way to do this ?
I use CaCert certificates for my domains.
I want to redirect my users to HTTPS only if they recognised the CaCert authority.
What is the best way to do this ?
I've done a little trick like this to open an image with https, and if success redirect to https version :
In the http page, include a javascript file only available in https:
The content of the js file:
Note that this solution is faster for users who can connect to https (because it blocks dom parsing) but it will be a little slower than an image based solution for user who can't connect to https (but it will slow by just a little, the time to the handshake to fail)
That solution works for CaCert but also if you want to redirect users who can't connect to https for others reason (old browsers without SNI, ...)