Steve Babs
2012-Oct-09 16:50 UTC
Working In Iframe for long time - Session timeout problem
Hi All, In my project I am using iframe popup box to load url that I need to locate. In that users can navigate all pages with in iframe only. Here User may not reload the parent window. In this case, Session automatically timedout. Please help me to reset session timeout ,even users working in iframe. *Thanks.* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/yAaYSEKhuhEJ. For more options, visit https://groups.google.com/groups/opt_out.
Robert Walker
2012-Oct-10 13:40 UTC
Re: Working In Iframe for long time - Session timeout problem
Steve Babs wrote in post #1079167:> Hi All, > > In my project I am using iframe popup box to load url that I need to > locate. In that users can navigate all pages with in iframe only. Here > User may not reload the parent window. In this case, Session > automatically > timedout. Please help me to reset session timeout ,even users working in > iframe.What session is "timing out?" Unless you''re written code, or added a library, Rails sessions don''t time out. So I''m going on the assumption here that you are showing someone else''s (something other than Rails) application within your iframe. Meaning that you don''t have direct control over the sessions on the "remote" application beyond what a regular user would have. If this is the case I''m afraid that you might be at their mercy. The only option I can think of would be to periodically send requests directly to the remote application to force it to keep the logged in user''s session alive. However, you can''t really just refresh the page they are currently viewing if they are trying to fill in a form. That would be extremely annoying to the user. It would be nice if you could send requests from JavaScript, but it sounds like you likely have no way to setup cross domain XMLHttpRequests to the remote application. But, you might be able to use XMLHttpRequest to your own Rails application instructing it to send a direct request to the remote application periodically using Ruby''s open-uri. http://www.ruby-doc.org/stdlib-1.9.3/libdoc/open-uri/rdoc/OpenURI.html -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.