|Cookie||doesn't exist (yet).|
|Cookie Action||cookie successfully deleted, check now!|
|Check Cookie||checks for existence of the cookie|
|Set Cookie||sets cookie that will expire in one hour|
|Expire Cookie||expires the cookie|
|Delete Cookie||deletes the cookie|
Note, the value of a changed or set cookie can only be read after reloading this page.
When you set a cookie you will see a "successful" action if the action was successful on the server side! That does not mean your browser stored the cookie successfully, only that everything seems to be okay from our side. To check if a cookie action was successful on your side you have to "Check Cookie" after setting the cookie (which then reloads the page and reads the value out from your browser storage). If the value changed the browser accepted the cookie and stored it successfully.
If you press "Set Cookie" again and again we increment the value of the cookie each time by 1. As explained above this is always 1 behind the actual value, so if you increment the value several times in a row and then "Check Cookie" you will get the actual value which is 1 more.
If you close the browser and revisit the page in a new window within the expire time (one hour) the cookie should still be set and you should see the value as it was when you "Checked Cookie" before you left.
Important: if you block cookies that does not mean a server cannot read an already existing cookie! If you set cookie, then leave the site, change your privacy settings to block first-party cookies and then come back we will still be able to read and display that cookie. But we cannot do any action on it, no set, expire or delete!
And a last information: sites can only read what "belongs" to them. The browser stores the domain the cookie came from and only lets that domain read it out again. So, cookies are safe to use, really!
The URL of this page is: http://winware.org/en/cookietest.php (If you want to test by revisiting this page, you have to use this page and not the test page for another language. Since the paths are different the pages cannot read out cookies from each other!)