Test for websockets support in browser

if (window.WebSocket){
    console.log("This browser supports WebSocket!");
} else {
    console.log("This browser does not support WebSocket.");
}

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.