diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index 234faff..d6cf64b 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -26,6 +26,8 @@
 #include "websocket-channel.hpp"
 #include "core/face-uri.hpp"
 
+#include <boost/date_time/posix_time/posix_time.hpp>
+
 namespace nfd {
 
 NFD_LOG_INIT("WebSocketChannel");
@@ -35,6 +37,7 @@
 WebSocketChannel::WebSocketChannel(const websocket::Endpoint& localEndpoint)
   : m_localEndpoint(localEndpoint)
   , m_isListening(false)
+  , m_pingInterval(10000)
 {
   // Setup WebSocket server
   m_server.clear_access_channels(websocketpp::log::alevel::all);
@@ -47,6 +50,11 @@
   // Always set SO_REUSEADDR flag
   m_server.set_reuse_addr(true);
 
+  // Detect disconnection using PONG message
+  m_server.set_pong_handler(bind(&WebSocketChannel::handlePong, this, _1, _2));
+  m_server.set_pong_timeout_handler(bind(&WebSocketChannel::handlePongTimeout,
+                                         this, _1, _2));
+
   this->setUri(FaceUri(localEndpoint, "ws"));
 }
 
@@ -55,6 +63,34 @@
 }
 
 void
+WebSocketChannel::setPongTimeout(time::milliseconds timeout)
+{
+  m_server.set_pong_timeout(static_cast<long>(timeout.count()));
+}
+
+void
+WebSocketChannel::handlePongTimeout(websocketpp::connection_hdl hdl, std::string msg)
+{
+  ChannelFaceMap::iterator it = m_channelFaces.find(hdl);
+  if (it != m_channelFaces.end())
+    {
+      it->second->close();
+      NFD_LOG_DEBUG("handlePongTimeout: remove " << it->second->getRemoteUri());
+      m_channelFaces.erase(it);
+    }
+}
+
+void
+WebSocketChannel::handlePong(websocketpp::connection_hdl hdl, std::string msg)
+{
+  ChannelFaceMap::iterator it = m_channelFaces.find(hdl);
+  if (it != m_channelFaces.end())
+    {
+      NFD_LOG_TRACE("handlePong: from " << it->second->getRemoteUri());
+    }
+}
+
+void
 WebSocketChannel::handleMessage(websocketpp::connection_hdl hdl,
                                 websocket::Server::message_ptr msg)
 {
@@ -73,7 +109,7 @@
     {
       remote = "wsclient://" + m_server.get_con_from_hdl(hdl)->get_remote_endpoint();
     }
-  catch (websocketpp::lib::error_code ec)
+  catch (websocketpp::lib::error_code&)
     {
       NFD_LOG_DEBUG("handleOpen: cannot get remote uri");
       websocketpp::lib::error_code ecode;
@@ -83,6 +119,37 @@
                                                               hdl, ref(m_server));
   m_onFaceCreatedCallback(face);
   m_channelFaces[hdl] = face;
+
+  // Schedule PING message
+  EventId pingEvent = scheduler::schedule(m_pingInterval,
+                                          bind(&WebSocketChannel::sendPing, this, hdl));
+  face->setPingEventId(pingEvent);
+}
+
+void
+WebSocketChannel::sendPing(websocketpp::connection_hdl hdl)
+{
+  ChannelFaceMap::iterator it = m_channelFaces.find(hdl);
+  if (it != m_channelFaces.end())
+    {
+      try
+        {
+          m_server.ping(hdl, "NFD-WebSocket");
+        }
+      catch (websocketpp::lib::error_code&)
+        {
+          it->second->close();
+          NFD_LOG_DEBUG("sendPing: failed to ping " << it->second->getRemoteUri());
+          m_channelFaces.erase(it);
+        }
+
+      NFD_LOG_TRACE("sendPing: to " << it->second->getRemoteUri());
+
+      // Schedule next PING message
+      EventId pingEvent = scheduler::schedule(m_pingInterval,
+                                              bind(&WebSocketChannel::sendPing, this, hdl));
+      it->second->setPingEventId(pingEvent);
+    }
 }
 
 void
@@ -92,7 +159,7 @@
   if (it != m_channelFaces.end())
     {
       it->second->close();
-      NFD_LOG_DEBUG("handleClose: remove client");
+      NFD_LOG_DEBUG("handleClose: remove " << it->second->getRemoteUri());
       m_channelFaces.erase(it);
     }
 }
diff --git a/daemon/face/websocket-channel.hpp b/daemon/face/websocket-channel.hpp
index 62c4940..bd5604b 100644
--- a/daemon/face/websocket-channel.hpp
+++ b/daemon/face/websocket-channel.hpp
@@ -88,8 +88,26 @@
   bool
   isListening() const;
 
+  void
+  setPingInterval(time::milliseconds interval)
+  {
+    m_pingInterval = interval;
+  }
+
+  void
+  setPongTimeout(time::milliseconds timeout);
+
 private:
   void
+  sendPing(websocketpp::connection_hdl hdl);
+
+  void
+  handlePong(websocketpp::connection_hdl hdl, std::string msg);
+
+  void
+  handlePongTimeout(websocketpp::connection_hdl hdl, std::string msg);
+
+  void
   handleMessage(websocketpp::connection_hdl hdl, websocket::Server::message_ptr msg);
 
   void
@@ -118,6 +136,7 @@
    */
   bool m_isListening;
 
+  time::milliseconds m_pingInterval;
 };
 
 inline bool
diff --git a/daemon/face/websocket-face.cpp b/daemon/face/websocket-face.cpp
index 79faf73..5b295b3 100644
--- a/daemon/face/websocket-face.cpp
+++ b/daemon/face/websocket-face.cpp
@@ -24,6 +24,7 @@
  **/
 
 #include "websocket-face.hpp"
+#include "core/global-io.hpp"
 
 namespace nfd {
 
@@ -37,9 +38,9 @@
   , m_server(server)
   , m_closed(false)
 {
+  this->setOnDemand(true);
 }
 
-
 void
 WebSocketFace::sendInterest(const Interest& interest)
 {
@@ -86,6 +87,7 @@
   if (m_closed == false)
     {
       m_closed = true;
+      scheduler::cancel(m_pingEventId);
       websocketpp::lib::error_code ecode;
       m_server.close(m_handle, websocketpp::close::status::normal, "closed by nfd", ecode);
 
diff --git a/daemon/face/websocket-face.hpp b/daemon/face/websocket-face.hpp
index 3f2a932..81a1111 100644
--- a/daemon/face/websocket-face.hpp
+++ b/daemon/face/websocket-face.hpp
@@ -28,6 +28,7 @@
 
 #include "face.hpp"
 #include "core/logger.hpp"
+#include "core/scheduler.hpp"
 
 #ifndef HAVE_WEBSOCKET
 #error "Cannot include this file when WebSocket support is not enabled"
@@ -64,11 +65,18 @@
   close();
 
   void
+  setPingEventId(EventId& id)
+  {
+    m_pingEventId = id;
+  }
+
+  void
   handleReceive(const std::string& msg);
 
 private:
   websocketpp::connection_hdl m_handle;
   websocket::Server& m_server;
+  EventId m_pingEventId;
   bool m_closed;
 };
 
