Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent Cookie in Classic ASP

I am having an issue with keeping persistent cookies.

Problem:

With below code, I am able to create a cookie and keep it during the entire browser session. However, when I close the browser the cookie is removed after a few seconds.

Points that have been checked:

  • The browser settings have been checked, and are configured to allow cookies. (first and 3thd party).
  • Multiple browsers have been used to test, it occurs in all (Chrome, IE8-9-10-11, Safari, Firefox, Opera)
  • Multiple Servers (MS 2000, 2003, 2008)

So I've got the following code in classic ASP:

Response.Cookies("user").expires= DateAdd("m",1,now())'looks like:  5/29/2014 3:53:13 PM'
Response.Cookies("user")("org")=request("org")

In short: My persistent Cookie keeps getting removed!

Any help would be greatly appreciated.

like image 635
user3585606 Avatar asked May 25 '26 22:05

user3585606


1 Answers

Solution to the problem: The browser was configured to "Delete browsing history on exit", which included the removal of cookies.

This option overrides any settings to keep cookies.

like image 54
user3585606 Avatar answered Jun 01 '26 14:06

user3585606



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!