I have a user that might be on a page for a long time (watching a video). Is there an easy Ajax call I can make to stop the member session logging out.
I'm considering a simple ajax get which just checks something on the member service - will this be enough to keep it alive. I'm off to test this myself but wondered if someone knows the answer already?
Thanks Simon - that would work but I'd rather not raise this value just for this one area. I know the user is active on the page so I'm looking for more of an Ajaxy keep alive solution. I'n guessing all I have to do is query the logged in member service to keep alive. I'll try this in a bit when I've fixed my current blocking issue :)
To update this - setting the timeout (in v7.1.8) didn't seem to affect just the members, the only key that seemed to have any affect was:
<add key="umbracoTimeOutInMinutes" value="180" />
I created an API call which I hit by AJAX (during each play / pause and at timed points during video playback) which just gets the current member and returns true / false (redirecting to the login page on false).
This does what I need - namely ensures that the user doesn't "play" a video after leaving the page open and then timing out and / or hitting the timeout whilst watchign a long video. Hope this helps someone else.
Member (Front end) Session Keep Alive
I have a user that might be on a page for a long time (watching a video). Is there an easy Ajax call I can make to stop the member session logging out.
I'm considering a simple ajax get which just checks something on the member service - will this be enough to keep it alive. I'm off to test this myself but wondered if someone knows the answer already?
Steve
You can extend the session timeout from the web.config - just extend the timeout value:
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="60" />
Thanks Simon - that would work but I'd rather not raise this value just for this one area. I know the user is active on the page so I'm looking for more of an Ajaxy keep alive solution. I'n guessing all I have to do is query the logged in member service to keep alive. I'll try this in a bit when I've fixed my current blocking issue :)
To update this - setting the timeout (in v7.1.8) didn't seem to affect just the members, the only key that seemed to have any affect was:
<add key="umbracoTimeOutInMinutes" value="180" />
I created an API call which I hit by AJAX (during each play / pause and at timed points during video playback) which just gets the current member and returns true / false (redirecting to the login page on false).
This does what I need - namely ensures that the user doesn't "play" a video after leaving the page open and then timing out and / or hitting the timeout whilst watchign a long video. Hope this helps someone else.
is working on a reply...