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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…