943,812 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 1488
  • Python RSS
Jan 27th, 2009
0

deleting cookies

Expand Post »
I am trying to delete a cookie by reseting it but it wont delete. What am i doing wrong

Python Syntax (Toggle Plain Text)
  1. #!/usr/bin/python
  2. import cgi
  3. import Cookie
  4. import os
  5.  
  6. def cookie_expiry_date(numdays):
  7. from datetime import date, timedelta
  8. new = date.today() + timedelta(days = numdays)
  9. return new.strftime("%a, %d-%b-%Y 23:59:59 GMT")
  10.  
  11.  
  12.  
  13.  
  14. print 'Set-Cookie: UserID=0; expires= '+cookie_expiry_date(-100);
  15.  
  16. print "Content-type: text/html\n"
  17. print "woooo"
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
adam291086 is offline Offline
61 posts
since Nov 2008
May 23rd, 2011
0
Re: deleting cookies
what do you mean? this code does nothing except print
Reputation Points: 5
Solved Threads: 3
Light Poster
ret801 is offline Offline
47 posts
since Jan 2011

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Deploying django websites in apache2 server
Next Thread in Python Forum Timeline: Integer to Binary





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC