Yes it can be done, we just have to figure out how.
Anurag Verma wrote:I am not very sure whether i have understood your problem, but suggesting the solution for whatever i have understood.
Have a zero size(invisible) iframe in your page having some content with auto refresh at say every 15 seconds or so.
On server have a filter for the URL patterns used by your app which will redirect to login page if the session is expired (make sure you keep the requested URL to serve after login). By doing this you will be redirected to login page whenever there is a request having no/invalid/expired session. Have a field in your session to keep last requested time, Upon every request, have a check whether the difference between last requested time & current time is greater than session expiration time, if yes, invalidate the session & redirect to login page. If not, then update the last requested time by current time in session for requests which are not made by iframe.
if the request is made by iframe & the session is no more valid, then render a script which will be executed right after being loaded, & which will reload the _top page (or you can have redirection to login page right from here).
Please confirm if this answers, or help me understand your question if i haven't.
I have managed to achieve a similar functionality via Javascript and a modal dialog but would like to cater for the occassion where the user has JS turned off.
Anurag Verma wrote:I am not very sure whether i have understood your problem, but suggesting the solution for whatever i have understood.
Have a zero size(invisible) iframe in your page having some content with auto refresh at say every 15 seconds or so.
On server have a filter for the URL patterns used by your app which will redirect to login page if the session is expired (make sure you keep the requested URL to serve after login). By doing this you will be redirected to login page whenever there is a request having no/invalid/expired session. Have a field in your session to keep last requested time, Upon every request, have a check whether the difference between last requested time & current time is greater than session expiration time, if yes, invalidate the session & redirect to login page. If not, then update the last requested time by current time in session for requests which are not made by iframe.
if the request is made by iframe & the session is no more valid, then render a script which will be executed right after being loaded, & which will reload the _top page (or you can have redirection to login page right from here).
Please confirm if this answers, or help me understand your question if i haven't.
Piyush Mangal wrote:
Anurag Verma wrote:...
Hi Anurag, The requirement is to achieve this with javascript disabled. SeeI have managed to achieve a similar functionality via Javascript and a modal dialog but would like to cater for the occassion where the user has JS turned off.
If not, then update the last requested time by current time in session for requests which are not made by iframe.
Yes it can be done, we just have to figure out how.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |