Why not store a parameter in the session indicating when it was last
saved.  On each page load, first check that parameter and if it's too
long ago, discard the session and begin a new one.  Then update the
parameter with the current time.

You may need middleware to accomplish this, but it ought to be
extremely simple to implement.  It won't get rid of the actual cookies
if the user doesn't return, but it will take care of session
expiration, and the old cookies shouldn't matter, since they contain
no session data except the ID, which you're invalidating after a
certain amount of time anyway.


On May 31, 12:54 pm, tyman26 <[EMAIL PROTECTED]> wrote:
> I also need to implement this type of feature.  Did you find anything
> on this?
>
> On May 2, 12:29 pm, [EMAIL PROTECTED] wrote:
>
> > Hi all,
>
> > I use django.contrib.sessions with SESSION_EXPIRE_AT_BROWSER_CLOSE=True.
>
> > I need a way toexpireasessionon certain amount of time of inactivity in the 
> > browser.
>
> > Each new request to django should retrigger theexpiretime.
>
> > Is there a possibility to modifiy thesessionmodule or build a middleware 
> > which does this ?
>
> > Regards,
> > Dirk
> > --
> > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > Jetzt GMX TopMail testen:http://www.gmx.net/de/go/topmail


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to