473,406 Members | 2,847 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,406 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 1741
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.