Archive for the ‘iframe’ Category

Handling session timeouts in an application with HTML IFrames

January 4, 2007 2 comments

In the application I am working on now, we load portions of the application as HTML documents into an IFrame. If the user does not act on the application for some time, the session times out and the user need to be redirected to the login page. We had set up this redirect using Acegi. But when the user performs an action on an IFrame after a period of inactivity, the login page would be shown in the IFrame. This is, of course, ugly and I have been looking for a workaround for this. Today I got this fixed, but I am unsure how proper this solution is.

We now have a page called redirectToLogin.html with:

<script type="text/javascript">

All this page does is redirect the browser to login.jsp page, but this prevents the login page being shown in the IFrame.

Kindly drop me a note if you know of a better solution.

Categories: html, iframe, javascript, tech