IETF 6455 WebSocket 仕様から引用するには:
The WebSocket Protocol attempts to address the goals of existing
bidirectional HTTP technologies in the context of the existing HTTP
infrastructure; as such, it is designed to work over HTTP ports 80
and 443 as well as to support HTTP proxies and intermediaries, even
if this implies some complexity specific to the current environment.
However, the design does not limit WebSocket to HTTP, and future
implementations could use a simpler handshake over a dedicated port
without reinventing the entire protocol.
つまり、すでに存在する HTTP および HTTPS 用の膨大なインフラストラクチャ (プロキシ、ファイアウォール、キャッシュ、およびその他の仲介者) があります。広く採用される可能性を高めるために、WebSocket プロトコルは、専用ポートで新しいプロトコルをサポートするためにすべてをゼロから再作成する必要なく、既存のインフラストラクチャを調整および拡張できるように設計されています。
また、WebSocket プロトコルが HTTP 互換のハンドシェイクを廃止したとしても、最新の Web のセキュリティ要件をサポートするには、ほぼ同等の複雑さのハンドシェイクが必要であり、ブラウザーとサーバーが相互に検証し、サポートできるようにする必要があることに注意することも重要です。 CORS (クロスオリジン要求共有) を安全に。「生の」Flash ソケットでさえ、実際のソケットを作成する前に、セキュリティ ポリシー リクエストを介してサーバーとハンドシェイクを行います。