Hi -
When a non-ajax request is made after the session expires, I just redirect the user to the home page. When an ajax request is made after the session expires, a 403 error is returned to the user but not displayed (I can see it in Firebug). How can I catch the 403 error in that instance and redirect the user to the home page? Thanks Paul _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
See at the bottom of
http://book.seaside.st/book/web-20/scriptaculous/ajax/wrap-up for a possible solution. Another solution might be to repeatedly (every couple of minutes) do an empty AJAX request, to avoid that the session expires if the window is still open. Lukas On 28 January 2010 17:32, Paul DeBruicker <[hidden email]> wrote: > Hi - > > > When a non-ajax request is made after the session expires, I just redirect > the user to the home page. When an ajax request is made after the session > expires, a 403 error is returned to the user but not displayed (I can see it > in Firebug). > > How can I catch the 403 error in that instance and redirect the user to the > home page? > > Thanks > > Paul > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Paul DeBruicker
>Another solution might be to repeatedly (every couple of minutes) do
>an empty AJAX request, to avoid that the session expires if the window >is still open. >Lukas Please let me know if there is any problem with implementing your suggestion like this: html script:((html jQuery ajax) html:''; interval: 3 minutes ). Thanks Paul _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
You don't need the #html: part. But otherwise it looks good.
Lukas 2010/1/28 Paul DeBruicker <[hidden email]>: >>Another solution might be to repeatedly (every couple of minutes) do >>an empty AJAX request, to avoid that the session expires if the window >>is still open. > >>Lukas > > > > Please let me know if there is any problem with implementing your suggestion > like this: > > > html script:((html jQuery ajax) html:''; interval: 3 minutes ). > > > > Thanks > > Paul > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Mhh, maybe you do, if otherwise no callback is created :-)
Lukas 2010/1/28 Lukas Renggli <[hidden email]>: > You don't need the #html: part. But otherwise it looks good. > > Lukas > > 2010/1/28 Paul DeBruicker <[hidden email]>: >>>Another solution might be to repeatedly (every couple of minutes) do >>>an empty AJAX request, to avoid that the session expires if the window >>>is still open. >> >>>Lukas >> >> >> >> Please let me know if there is any problem with implementing your suggestion >> like this: >> >> >> html script:((html jQuery ajax) html:''; interval: 3 minutes ). >> >> >> >> Thanks >> >> Paul >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > > -- > Lukas Renggli > http://www.lukas-renggli.ch > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |