Client only cookies – cookie which doesn’t ever go to the server

I know it´s a little late for you, but this answer is for all who have the same problem.

  1. With HTML5 you can use web storage.

  2. (Just an idea! – not tested!)
    You could define a cookie (via javascript on client) and set the “secure”-attribute.
    In this case, the cookie will only be sent to the server on HTTPS connections.
    To make sure the cookie never leaves the browser, you just never open a HTTPS connection 😉

EDIT

Now it´s 2022 and I would not recommend solution 2) anymore.
Instead of setting the secure flag on the cookie, set the path to a path on the server which is never used.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)