How can you tell if your WebSocket connection is native or emulated? This question came up during our recent webcast.
First, this isn’t something you need to loose sleep over, your WebSocket server should take care of this automatically for you, that is falling back to the most efficient emulation if native support is not available (for whatever reason, such as browser limitations or proxies or other network intermediaries breaking the native WebSocket connection). The Kaazing WebSocket Gateway does this exceptionally well in a 100% transparent manner, providing virtually the same performance with emulation as native WebSockets.
If the WebSocket connection is native, you’ll see an HTTP request with the Upgrade header: WebSocket and an HTTP response with Upgrade header: WebSocket.
In case of emulation, you won’t see the upgrade header in the response: