What is the difference between http and https in programming

I just knew that β€œs” means β€œSafe,” and the user should never enter sensitive information on a website that uses only http. But I really want to know what these two protocols affect my programming, for example:

  • How "https" appeared on some website, and some do not (or maybe how they turn on and off from this function, which I don’t know). Does this mean that I have to register somewhere?

  • I thought to myself that communication in http is not encrypted, while some encryption can take place in https, is this correct?

  • And since the encryption process (if any) is performed by the browser, as a result, my server-side code has nothing to do with "http" or "https", is this correct?

  • Is there a way to force the user to use only https?

+5
source share
2 answers
  • , HTTPS, , ( " " ), (. ). , , , . , (, , , ). HTTPS, , . , .

  • HTTPS . , , , , ​​ Diffie-Hellman Exchange, , . , , , , .

  • , , . - ; HTTP-.

  • , HTTPS. (, RewriteRule Apache, RewriteCond HTTPS), HSTS, . HSTS , HSTS, HTTP HTTPS (. HTTP Strict Transport Security).

+7

HTTPS, SSL- -. , HTTP- . . , , , .

HTTPS , -, HTTP- HTTPS.

SSL/TLS.

+4

All Articles