The demo cookies have been removed.
Set-Cookie: demo_username=deleted; expires=Wed, 04 Feb 2026 02:04:08 GMT; path=/ Set-Cookie: demo_theme=deleted; expires=Wed, 04 Feb 2026 02:04:08 GMT; path=/ Set-Cookie: demo_created=deleted; expires=Wed, 04 Feb 2026 02:04:08 GMT; path=/
Set-Cookie headers with past expiration<?php
// To delete a cookie, set it with an expiration in the past
// IMPORTANT: Must use same 'path' as when cookie was set!
setcookie('demo_username', '', [
'expires' => time() - 3600, // 1 hour ago
'path' => '/' // Same path as when set
]);
setcookie('demo_theme', '', [
'expires' => time() - 3600,
'path' => '/'
]);
// Alternative syntax (older PHP style):
// setcookie('demo_username', '', time() - 3600, '/');
?>
| Mistake | Why It Fails |
|---|---|
Wrong path |
Cookie set with path=/ won't be deleted if you omit path |
Wrong domain |
Cookie for .example.com won't delete if you specify www.example.com |
| Just unsetting value | setcookie('name', '') sets empty value, doesn't delete |
(This shows what the browser sent with this request - deletion takes effect on next request)
(No cookies)