Please help me do the same:
$. removeCookie ('lk', {path: '/'});
and
$. cookie ('lk', '1', {expires: 7, path: '/'});
location.replace ("/ my-works /");
e.preventDefault ();
is only in PHP. IMPORTANT: You need to do this manipulation before loading the page content.
Answer 1, authority 100%
Just do it before generating the template.
unset ($ _ COOKIE ['lk']);
setcookie ('lk', null, -1, '/');
Answer 2, authority 25%
http://php.net/manual/en/function.setcookie.php
To delete a cookie, it is enough to specify some time in the past as the expiration date.