Skip to content

Instantly share code, notes, and snippets.

@Pominova
Created October 14, 2015 06:35
Show Gist options
  • Save Pominova/62179b46c0601ff7c7b3 to your computer and use it in GitHub Desktop.
Save Pominova/62179b46c0601ff7c7b3 to your computer and use it in GitHub Desktop.
<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