]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitaweb.js
Logout (partial work) (multi-user matita)
[helm.git] / matitaB / matita / matitaweb.js
index 0c661623bc148fe1f8614b3bb8c63b0401ae6059..423eda674bbd1ed06c54d379dd65e56b5fb78f24 100644 (file)
@@ -514,3 +514,15 @@ function readCookie(name) {
        }
        return null;
 }
+
+function delete_cookie ( cookie_name )
+{
+  var cookie_date = new Date();  // current date & time
+  cookie_date.setTime ( cookie_date.getTime() - 1 );
+  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
+}
+
+function delete_session()
+{
+       delete_cookie("session");
+}