Check if HTML5 sessionStorage value exists with PHP (like with cookies)

Mark de Vries picture Mark de Vries · Apr 29, 2013 · Viewed 29.1k times · Source

With PHP it's possible to check if a cookie exists. Is there a similar way to check if a HTML5 sessionStorage (webstorage) item exists?

Answer

Lasse picture Lasse · Apr 29, 2013

If you mean by sessionStorage the HTML5 web storage (as I understand from the tags in your question), then no. It is not possible to access this data from PHP. It can only be accessed with JavaScript and passed through to PHP with AJAX.