title: How to implement Ping/Pong request for webSocket connection alive in javascript?
body: <p>I use websocket in javascript. But the connection close after one minute.</p>
  
  <p>I am wondering somethings:</p>
  
  <p>1- Is not Websocket naturaly providing with Ping/Pong messages not to close the connection? I think it have to. Otherwise what is the difference between websocket and TCP connection?</p>
  
  <p>2- If I have to send the ping/pong messages, how is the ping message sent? What am I need to do? Is WebSocket object provide a ping method? Or should I call a method as websocket.send("ping") ? I am use naturaly WebSocket object in javascipt.</p>
  
  <p>3- Should the server respond to Ping requests with Pong? Should this be implemented separately on the server side?</p>
  
  <p>Note:Sorry for my english.</p>