url(r'^(?P<name>[^/]+)$',
         'document_detail', name="wiki_details"),
+    
+    url(r'^ping/$', 'ping', name='ping'),
 )
 
         return JSONResponse({"result": api.publish_book(document)})
     except wlapi.APICallException, e:
         return JSONServerError({"message": str(e)})
+
+
+def ping(request):
+    return http.HttpResponse('pong')
 
 
                if (vname == "ajax_publish")
                        return base_path + "/" + arguments[1] + "/publish";
+               
+               if (vname == 'ping')
+                   return base_path + '/ping/'
 
                console.log("Couldn't reverse match:", vname);
                return "/404.html";
        };
 
        $.wikiapi.WikiDocument = WikiDocument;
+       
+       
+       var ping = function () {
+        $.ajax({
+            url : reverse('ping'),
+                       timeout: 2000,
+            complete : function () {
+                setTimeout(function () {
+                    ping();
+                }, 600000);
+            }
+        });
+    };
+       
+    ping();
+
 })(jQuery);