Setting document.cookie with an expire date still sets as a session cookie in FF

Hello, all,

My boss just ran across something that isn’t working as expected, and I’m researching it.

As a test to duplicate what he is experiencing, I have a file called testform.html and at the bottom of the page inside my script tags, I placed:

document.cookie = "name=testcookie;expires=Mon, 24 Sep 2018 00:00:00 GMT;path=/";

Opening the page in FF and using Dev Tools, I click on the Storage tab and see:

It’s setting as a session cookie, not planting it on the HD as I had expected.

I have not tried this in IE, but wanted to ask if anyone else has experienced this issue?

V/r,

^ _ ^

Are… you hard coding the expiry of the cookie?

Affirmative.

The line seems to work fine for me in FF… what version are you using?

52.9 32-bit.

might be time to update considering the 52 branch is in End Of Life for ESR as of tomorrow… but i cant imagine that it’d make THAT much of a difference, considering 52 is only a year and a half old…hrm.

Can’t. For some strange reason, the DoD insists on lagging behind on software versions, especially browsers. They are security testing the next version that they are considering, but it’s probably v53. :open_mouth:

Such is my lot. Anyhoo… I’m heading out to a dental appointment. I’ll get back to it, tomorrow. Thank you!

V/r,

^ _ ^

Oh. Government work. I salute you and commiserate your software standing. :wink:

I’m not sure what else I can say other than “It works for me”… unless something ELSE on your page (or in the server backend) is futzing around with the same cookie…

Boss figured it out. Security settings that are locked from any user changing them make it so that cookies cannot be set to HD. ALL cookies are session cookies.

sigh

V/r,

^ _ ^

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.