Delete/ Regenerate a cookie that has a domain as local

  • Step 1: Convert docs file to HTML and add 3 HTML elements - 1 input box, "Delete Cookies" button, "Add Cookies" button

  • Step 2: We will input the cookie name in the input field and click on "delete cookies" - That will delete the particular first-party cookie ( a cookie with the domain as local ) and next add the data of the cookie in some text file or local memory.

  • Step 3: We will now regenerate the same cookie by entering the same cookie name in the input and clicking on the button "Add cookie", so now you pick data from notepad/ local storage and regenerate the cookie

DEMO

walkthrough