Detecting SNI (Server Name Indication) browser support in javascript

后端 未结 4 1184
野的像风
野的像风 2021-01-02 02:13

I want to be able to detect if the browser support SNI - Server Name Indication. I\'m hoping to redirect non compliant clients to a different address.

I was thinkin

4条回答
  •  醉话见心
    2021-01-02 02:34

    You can only test for SNI support prior to requiring it. That is, you cannot force users onto SNI HTTPS and then fall-back if they don't support it, because they will receive an error like this (from Chrome on Windows XP) with no way to proceed.

    So (unfortunately) the user has to actually begin over an insecure HTTP connection and then be upgraded only if they support SNI.

    You can detect SNI support via:

    1. Remote script
      From your plain HTTP page, load a

提交回复
热议问题