Andres Olarte Andres Olarte - 10 months ago 64
Javascript Question

Detecting SNI (Server Name Indication) browser support in javascript

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 thinking of loading some content through SSL and make sure it was transfered securely. Otherwise the browser doesn't support SNI. Can this be done?


You could set up a server that supports SNI, serving two host names, on where you require SNI and one that's a fallback solution, both serving the name that they are hosting.

Something along the lines of:

  • returns a representation saying I'm
  • returns I'm (and requires SNI).

If you make an XHR request to and it returns, then the browser doesn't support SNI.