DD-Mon-YY HH:MM:SS GMT
Here is an example where the cookie will live upto Mon, 26 Jun 2017:00:00:00 GMT
<html>
<head>
<title>Javascript Cookies</title>
<script type = "text/javascript">
<!--
function Cookie_name()
{
if( document.myform.customer.value == "" ){
alert("Enter some value!");
return;
}
cookievalue= escape(document.myform.customer.value) + ";";
document.cookie="name=" + cookievalue;
document.write ("Setting Cookies : " + "name=" + cookievalue );
}
//-->
</script>
</head>
<body>
<form name="myform" action="">
Enter name : <br>
<input type="text" name="customer"/><br><br>
<input type="button" value="Submit" onclick="Cookie_name();"/>
</form>
</body>
</html>