Solved

Set cookie expire time

Posted on 2007-12-03
7
1,607 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

820 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