Skip to content

Instantly share code, notes, and snippets.

@kolserdav
Created April 7, 2018 03:11
Show Gist options
  • Save kolserdav/3e12219253abf283cb90f718a78974d2 to your computer and use it in GitHub Desktop.
Save kolserdav/3e12219253abf283cb90f718a78974d2 to your computer and use it in GitHub Desktop.
Create cookie with javascript
function setCookie(name, cookie, time){
let date = new Date(new Date().getTime() + time);
let nameCookie = name+"=";
document.cookie = nameCookie+cookie+"; "+"expires="+ date.toUTCString();
}
@nick8210
Copy link

where are you located

@kolserdav
Copy link
Author

kolserdav commented May 19, 2023

where are you located

kolserdav@uyem.ru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment