Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0b46205ae3
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (38 sloc) 1.316 kb
setcookie("TestCookieValues", "Test Cookie Value", 1565778363, "/dir", "", false, true);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Cookie Values</title>
<link rel="stylesheet" href="../tests.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<h1>Cookie Values</h1>
<i>Jan Odvarko,</i>
<li>Open Firebug, enable Cookies panel and refresh this page.</li>
<li>There should be a <i>TestCookieValue</i> cookie in the list.</li>
<li>Verify cookie values:
<li>Name: <code>TestCookieValues</code></li>
<li>Value: <code>CookieValue</code></li>
<li>Domain: <code id="domain"></code></li>
<li>Size: <code>27 B</code></li>
<li>Path: <code>/dir</code></li>
<li>Expires: <code id="expires"></code> <i>should be 1565778363 in milliseconds</i></li>
<li>HttpOnly: <code>HttpOnly</code></li>
var domain = document.getElementById("domain");
domain.innerHTML =;
// Format the expires date using the current locale.
var date = new Date(1565778363 * 1000);
var expires = document.getElementById("expires");
expires.innerHTML = date.toLocaleString();
Jump to Line
Something went wrong with that request. Please try again.