Hi,
The answer to this is probably a one line, but i can’t find it
anywhere.
How do I make a cookie expire when a browser is closed (ie when the
session ends)? The expiry key in the cookie hash only seems to take
dates.
Thanks,
Scott
Hi,
The answer to this is probably a one line, but i can’t find it
anywhere.
How do I make a cookie expire when a browser is closed (ie when the
session ends)? The expiry key in the cookie hash only seems to take
dates.
Thanks,
Scott
The answer to this is probably a one line, but i can’t find it
anywhere.How do I make a cookie expire when a browser is closed (ie when the
session ends)? The expiry key in the cookie hash only seems to take
dates.
Set it to a date in the past… like 1.day.ago
On Jan 19, 2007, at 12:32 PM, Philip H. wrote:
The answer to this is probably a one line, but i can’t find it
anywhere.How do I make a cookie expire when a browser is closed (ie when the
session ends)? The expiry key in the cookie hash only seems to take
dates.Set it to a date in the past… like 1.day.ago
Actually, if you set a cookie without giving an expiration date, it
is only retained until the browser is closed. (Which can mean the
program itself, not just a window or a tab.)
An expiration in the past will delete the cookie immediately.
-Rob
Rob B. http://agileconsultingllc.com
[email protected]
Skype: rob.biedenharn
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs