Setting cookie secure flag using javascript?

I'm trying to set the secure property on a cookie using JS but I can't get it to work? We always use https . Not sure what I'm doing wrong?

document.cookie = cookieName+"="+botwGuid+"; path=/; domain=.mydomain.com; secure";
894359Asked:
Who is Participating?
 
894359Author Commented:
I figured it out. It was an issue with our servers not being updated with the code from my sandbox. :0)

Thanks!
0
 
Julian HansenCommented:
How is it not working - what are you expecting and what are you observing?
0
 
894359Author Commented:
When I look at the cookie that is created in the browser (Chrome - using "Edit This Cooke"), the "Secure" flag should be checked. Please see attached image.SHow cookie settings
0
 
894359Author Commented:
Not real issue. Problem was with code deployment to web servers.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.