Skip to content

Instantly share code, notes, and snippets.

@acidtib
Created July 5, 2013 17:22
Show Gist options
  • Select an option

  • Save acidtib/5935965 to your computer and use it in GitHub Desktop.

Select an option

Save acidtib/5935965 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
function createCookie(name,value) {
var date = new Date();
var minutes = 1440;
date.setTime(date.getTime() + (minutes * 60 * 1000));
var expires = "; expires="+date.toGMTString();
document.cookie = name+"="+value+expires+"; path=/;";
}
createCookie('name','value');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment