Solved

Set cookie expire time

Posted on 2007-12-03
7
1,599 Views
Last Modified: 2008-02-01
How to i set in javascript a cookie that will expire at midnight, on 00:00 cookie will expire
0
Comment
Question by:rares_dumitrescu
  • 5
  • 2
7 Comments
 
LVL 19

Expert Comment

by:erikTsomik
ID: 20398486
add to the place where you setting the cookie this
expires=Thu, 01-Jan-70 00:00:01 GMT;';
This will expire your cookie at midnight
0
 

Author Comment

by:rares_dumitrescu
ID: 20398529
01-Jan-70 ? This time is in the past ... will not set cookie at all
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 20398551
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:rares_dumitrescu
ID: 20398583
Yeah, but i want to expire on midnight on same day ... And on my midnight:) i don`t know how to say ..
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 20398608
will it once a month
0
 
LVL 19

Accepted Solution

by:
erikTsomik earned 500 total points
ID: 20398643
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 20398770
Thank you . Was links helpfull?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now