Niharika29 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/179471

Change subject: Ping server every five minutes once user lands on application 
page to keep the session alive.
......................................................................

Ping server every five minutes once user lands on application page
to keep the session alive.

Change-Id: I6babb68ddb77296afbd67947dbc7f79e611df882
---
A public/js/ping.html
M public/js/site.js
2 files changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships 
refs/changes/71/179471/1

diff --git a/public/js/ping.html b/public/js/ping.html
new file mode 100644
index 0000000..262310f
--- /dev/null
+++ b/public/js/ping.html
@@ -0,0 +1,3 @@
+<html>
+    <p>Hello, beautiful!</p>
+</html>
\ No newline at end of file
diff --git a/public/js/site.js b/public/js/site.js
index 24bfbfb..e73718e 100644
--- a/public/js/site.js
+++ b/public/js/site.js
@@ -1,5 +1,11 @@
-(function( $, document, window ) {
+( function( $, document, window ) {
+
+    function keepSessionAlive() {
+        $.post( 'ping.html' );
+    }
+
   $(document).ready(function() {
+
     $('.langlist').each(function() {
       var $list = $(this),
         $select = $(document.createElement('select'))
@@ -45,5 +51,9 @@
       resizeFn();
       $(window).resize(resizeFn);
     });
+
+    setInterval( keepSessionAlive, 300000 );
+
   });
-})( jQuery, document, window );
+
+})( jQuery, document, window );
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/179471
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6babb68ddb77296afbd67947dbc7f79e611df882
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/wikimania-scholarships
Gerrit-Branch: master
Gerrit-Owner: Niharika29 <niharikakohl...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to