Skip to content

Instantly share code, notes, and snippets.

@Pominova
Created Oct 14, 2015
Embed
What would you like to do?
<script>
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
createCookie("dev","notset",1000)
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment