Re: cookies and expiry

2010-07-07 Thread dominic jansen
Hey Nataraj,

i have the same problem.

First of all, your code seems to be correct.
I did it in the same way following the class despriction. When you set
the expiring date to one week (Date expires = new Date(new
Date().getTime() + (1000 * 60 * 60 * 24 * 7));) it will work and you
get a cookie.
I tried it for two and three weeks and it works. For four weeks it fails.

It looks like there is a problem with longer expiring dates
Does anyone have a solution?

Cheers!



2010/6/4 Nataraj M Basappa natara...@gmail.com:
 Hi all,
  Just been pondering my head over this piece of code.

 Date expires = new Date(new Date().getTime() + (1000 * 60 * 60 * 24 *
 30));
 Cookies.setCookie(token, token, expires);
 Cookies.setCookie(secret, secret, expires, localhost, /,
 true);
 Cookies.setCookie(uname, ram, null);

  Can anyone correct me. First two calls completely fail to set
 cookies, last one does set it but expiry time is set to
 current browser session. (looking at googles test code for last call
 should have set to never expire)

 Cheers!

 --
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



cookies and expiry

2010-06-04 Thread Nataraj M Basappa
Hi all,
  Just been pondering my head over this piece of code.

Date expires = new Date(new Date().getTime() + (1000 * 60 * 60 * 24 *
30));
Cookies.setCookie(token, token, expires);
Cookies.setCookie(secret, secret, expires, localhost, /,
true);
Cookies.setCookie(uname, ram, null);

 Can anyone correct me. First two calls completely fail to set
cookies, last one does set it but expiry time is set to
current browser session. (looking at googles test code for last call
should have set to never expire)

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.