From 53499341e5db2ecd8574d464876f615150c2e544 Mon Sep 17 00:00:00 2001 From: wesyah234 Date: Thu, 21 May 2015 09:45:51 -0500 Subject: [PATCH] add reference to touchstart and touchend events these extra events are triggered by touchscreens and would indicate that the user is still actively using the application, so we should not timeout during that activity. (I would suggest these should be also added as defaults for staleSessionActivityEvents) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b98d23..448d2a0 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Configuration is via `Meteor.settings.public`. - `staleSessionInactivityTimeout` - the amount of time (in ms) after which, if no activity is noticed, a session will be considered stale - default 30 minutes. - `staleSessionPurgeInterval` - interval (in ms) at which stale sessions are purged i.e. found and forcibly logged out - default 1 minute. - `staleSessionHeartbeatInterval` - interval (in ms) at which activity heartbeats are sent up to the server - default every 3 minutes. -- `staleSessionActivityEvents` - the jquery events which are considered indicator of activity e.g. in an on() call - default `mousemove click keydown` +- `staleSessionActivityEvents` - the jquery events which are considered indicator of activity e.g. in an on() call - default `mousemove click keydown` (NOTE: add "touchstart" and "touchend" to also detect activity on a mobile touchscreen) You can set these variables in `config/settings.json` and then launch Meteor with `meteor --settings config/settings.json`. @@ -43,7 +43,7 @@ Example `config/settings.json` file: "staleSessionInactivityTimeout": 1800000, "staleSessionHeartbeatInterval": 180000, "staleSessionPurgeInterval": 60000, - "staleSessionActivityEvents": "mousemove click keydown" + "staleSessionActivityEvents": "mousemove click keydown touchstart touchend" } } ```