Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
424 views
in Technique[技术] by (71.8m points)

javascript - IE-删除Cookie CookieConrol(IE - removing cookies CookieConrol)

I am trying to remove a cookie from IE when the page loads.

(页面加载时,我试图从IE中删除Cookie。)

The Cookie is no longer in use and needs to be removed, I have tried setting the expiry date as follows:

(Cookie不再使用,需要将其删除,我尝试如下设置到期日期:)

function seta() {    
  document.cookie = "CookieControl=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
}

function deleteCookie(name) {
  setCookie('CookieControl', "", {
    'max-age': -1
  })
}

If I create the cookie I can delete it.

(如果创建cookie,则可以将其删除。)

$j1.cookie('CookieControl', 'hrd', { expires: 365, path: '/' });)

How do I delete an existing cookie in IE 11?

(如何删除IE 11中的现有Cookie?)

  ask by TJ15 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...