SunQuest
           Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 27th, 2000, 04:47 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hai
i had set three cookies using cookie headers like this before Content-type:

print "Set-Cookie: name=value1; expires='+1h';XBXB.
print "Content-Type: text/html";

Now i want to delete this cookie as my logout process.How can i delete the cookie;
I know this can be done by using an expired date . How can i do this as of my prevoios example?

vijay

Reply With Quote
  #2  
Old August 27th, 2000, 06:57 PM
Adrian2 Adrian2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Location: London, England
Posts: 251 Adrian2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
LOL

I asked this question quite recently and had it answered. So now it's my turn.....

A cookie can be deleted by setting an expiry date in the past. You can either do this by setting an absolute date such as 1 Jan 1998 - or by using a relative value such as 2 days ago.

The Netscape documentation says:

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>If a CGI script wishes to delete a cookie, it can do so by returning a cookie with the same name, and an expires time which is in the past. The path and name must match exactly in order for the expiring cookie to replace the valid cookie. This requirement makes it difficult for anyone but the originator of a cookie to delete a cookie.[/quote]

http://www.netscape.com/newsref/std/cookie_spec.html



Reply With Quote
  #3  
Old September 6th, 2000, 12:15 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hai,
thanks.
but you are speaking theoretically .
how can i set a date ....
how can i find and set date

vijay

Reply With Quote
  #4  
Old September 6th, 2000, 01:08 AM
dwarf dwarf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 300 dwarf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Well, just use some real date in the past, say January 2nd, 1990. It will do the same thing. So, use your previous header:

[b]print "Set-Cookie: name=value1; expires='+1h';9gZg#g{icbg?@A=hX+h+**g 4 k=hd+hstyleidons@!h;g0c$h1"hgwww\.toospoiledmusic\.coms usin!`gggor1ggwww\.too-spoiledmusic\.comlue

Reply With Quote
  #5  
Old September 6th, 2000, 11:47 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
thanks again...

i know how to set a cookie and deleting a cookie. But the problem is i want to know how can i set Date field.
According to Netscape Specification we have to send a Date header , i think so.
I want more details about this.
Anybody please help me.

vijay


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Deleting Cookie?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway