Regarding HTML5 How can you tell if the browser supports web

Regarding HTML5: How can you tell if the browser supports websockets or not? Write the conditional logic and return true or false based on the response.

Solution

In the javascript console of web browser try executing the following script :

function WebSocket()

{

if(\"WebSocket\" in window)

{

return true;

}

else

{

return false;

}

}

Regarding HTML5: How can you tell if the browser supports websockets or not? Write the conditional logic and return true or false based on the response.Solution

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site