You need to fix your code in the first place. In general, your question makes no sense. You said 'how can we do xxx, because my code is broken, and without showing you the code, I've assumed that this is how to fix it'. As deleting cookies is something that's very easy to find out how to do, using google, odds are good that you'd do better to show us your code, and let us tell you how to fix it, rather than assuming that
this[
^] will fix it.