Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

We have a visualforce page that serves as a somewhat live dashboard for information in our salesforce instance. Through javascript and Javascript remoting (remote actions), we are polling salesforce for data every couple of minutes.

My question is around sessions and timeouts. Will these remote action invocations serve as "activity" and keep the session alive if there is no other user interaction on the page? I couldn't seem to find anything in the documentation that addressed this directly.

Ideally, we'd like to leave this page up all day without having the session time out.

share|improve this question
    
I'm not really sure, but is it not that "Session Settings" that could be edited at "Setup > Security Controls > Session Settings"? –  mast0r Dec 17 '12 at 14:27
    
In the session settings, you can set the timeout interval. Your session will auto-timeout if you hit that interval and the user has recorded no "activity". My questions is this: If your only activity is remote actions from Javascript, will you eventually timeout? Or does that remote action count as activity, thus, keeping your session alive? –  Kevin O'Hara Dec 17 '12 at 14:38
add comment

1 Answer 1

up vote 3 down vote accepted

I think I got the answer that I was looking for.

Here is what I did...

  1. Set the session timeout settings to 30 minutes
  2. Launched my VF page
  3. Allowed it to run, by itself, for about an hour. During this time the Remote Actions were triggered about every minute or so.

I received no errors. I can only assume that this means that the Remote Actions triggered user activity, thus keeping my session alive.

share|improve this answer
1  
Definitely the best way to test this question! From my experience the answer is YES, your session will be kept alive by polled RemoteAction invocations. However, I don't that each RemoteAction invocation resets Salesforce's session timeout JavaScript timer (which causes that annoying popup window to show up). So you might want to manually clear and reset that timeout. –  zachelrath Dec 17 '12 at 17:31
    
Thanks for the clarification. I'll look into the Javascript timer and see if I can reset that. –  Kevin O'Hara Dec 17 '12 at 18:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.