Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (21 sloc) 681 Bytes
<html lang="en-US" dir="ltr">
<meta charset="utf-8">
<p>Trying to set cookie with value:</p><pre id='cookie_set'></pre>
<p>Your current non-HTTPOnly cookies are:</p><pre id='cookie_read'></pre>
// Try to set a cookie
var randVal = Math.random();
var set = document.getElementById('cookie_set');
set.innerHTML = randVal;
document.cookie = 'testPageCookie='+randVal;
// Get a cookie
var get = document.getElementById('cookie_read');
var cookies = document.cookie;
get.innerHTML = cookies;