473,287 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Setting a timeout for a cookie

Hi,

I'm wondering how do you set a 'timeout' or expiry date/time for a
cookie set using a python cgi script. I can set a cookie ok but I
dunno how to set the expiry time so it always expires at the end of
the session.

Thanks!

Oct 15 '07 #1
2 1735
On Oct 15, 4:09 pm, sophie_newbie <paulgeele...@gmail.comwrote:
Hi,

I'm wondering how do you set a 'timeout' or expiry date/time for a
cookie set using a python cgi script. I can set a cookie ok but I
dunno how to set the expiry time so it always expires at the end of
the session.
Easy, you don't. It's only if you set a timeout (aka. expires
parameter) that it will last longer than the session.
Just don't set it and it'll last till the browser is shut down.

Oct 15 '07 #2
Peter Bengtsson <pe*****@gmail.comwrites:
On Oct 15, 4:09 pm, sophie_newbie <paulgeele...@gmail.comwrote:
>Hi,

I'm wondering how do you set a 'timeout' or expiry date/time for a
cookie set using a python cgi script. I can set a cookie ok but I
dunno how to set the expiry time so it always expires at the end of
the session.

Easy, you don't. It's only if you set a timeout (aka. expires
parameter) that it will last longer than the session.
Just don't set it and it'll last till the browser is shut down.
And don't set a max-age parameter either (max-age and expires do
essentially the same thing).
John
Oct 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Joseph | last post by:
I have an intranet application that I setup using windows authentication through IIS basic authentication. Is there a way to set a timeout, so that after ten minutes the user will be prompted...
2
by: Kian Goh | last post by:
Hi there, I am trying to use an entry level security for my resources website. I followed the procedures in the MS published Self-Paced Training Kit, everything seems working as expected....
0
by: Sebastien Roeckel | last post by:
Hello I have a problem with the authentication cookie timeout in a forms authentication. I've developed a Web application that uses forms authentication. My web.config is configured for the...
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
8
by: tshad | last post by:
I am trying to get my authentication to work and want the timeout to be 30 minutes, but only while the browser is active. If the browser closes, I want the cookie to disappear. Is this...
6
by: somaboy mx | last post by:
Hello I need people to be able to complete long text blocks in my cms before their session times out. From the php documentation I gather that ini directive session.gc_maxlifetime would be the...
8
by: bashful.belle | last post by:
I'm using Forms authentication and a non persistent cookie in my asp.net application. How do i get the cookie to time out after a period of inactivity, say 10 minutes, and force the user to login...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
by: trullock | last post by:
Hi, I want to test some session timeout code ive written but im getting a few problems. I want to reduce the session timeout to 1min so i dont have to wait around for 20 min to see if my code...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.