• 0

[JavaScript] Saving cookie problem


Question

Hello gang,

I'm having a strange problem where saving one specifc word is not saving to the cookie. The word is "passwordue" and it is used in other areas of our code (I inherited this) I can use "passwordTe" or any other word (so it seems, I haven't tried the entire dictionary) This is driving me nuts

setCookie('passwordue',"testPassword",getCookie('rememberuser')=='true'?new Date('1/5/2020'):'','/');

function setCookie(name, value, expires, path, domain, secure){
  if (!value.toString().length>0) return
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.