in reply to Deleting cookies

Very good. You have done your own search for explanations and examples. You have correctly understood the essence of the solutions posted elsewhere. You have tried it yourself.

Next step: post your best attempt here so we can perhaps see what is going wrong.