Skip to content

Instantly share code, notes, and snippets.

@anmolsukki
Created February 14, 2021 06:48
Show Gist options
  • Save anmolsukki/7b7a03647a6757ef466869561d7a96c8 to your computer and use it in GitHub Desktop.
Save anmolsukki/7b7a03647a6757ef466869561d7a96c8 to your computer and use it in GitHub Desktop.

Session and Cookies

Session Storage

window.sessionStorage.setItem('login', 'token');

Remove Cookies with Document

document.cookie = 'token=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment