# Session\_timeout and link\_to\_remote conflict

**URL:** <https://www.ruby-forum.com/t/session-timeout-and-link-to-remote-conflict/103145>\
**Category:** Rails\
**Created:** [May 2, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/session-timeout-and-link-to-remote-conflict/103145 "2007-05-02T12:08:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 2, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/session-timeout-and-link-to-remote-conflict/103145/1 "2007-05-02T12:08:52Z")

</div>

Hi,

I have a membership rails application and I used session\_timeout  
plugin to allow accounts  
to automatically logout after a period of time (15 minutes)

In some screen I have a div container which is updated with  
link\_to\_remote function.

If the application is idle 15 minutes, and I’ll try to press the  
link\_to\_remote, the login page it will be loaded in the div, not as  
parent page.

How can I resolve this ?

Thanks

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 2, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/session-timeout-and-link-to-remote-conflict/103145/2 "2007-05-02T15:24:19Z")

</div>

Quoth removed\_email\_address@domain.invalid (removed\_email\_address@domain.invalid):

> If the application is idle 15 minutes, and I’ll try to press the  
> link\_to\_remote, the login page it will be loaded in the div, not as  
> parent page.
> 
> How can I resolve this ?

I had a similar problem. I resolved it in the authentication code  
which renders the login page:

if request.xhr?  
# redirect to auth page  
else  
# render auth template  
end

Ken

–

I use the words you taught me. If they don’t mean anything any more,  
teach me others. Or let me be silent.  
Samuel Beckett (Clov, Endgame)
