is there any way to empty localStorage (defined in html5) through php?
I need something like this:
<script type="text/javascript">
window.localStorage.clear();
</script>
<?php header('Location: '.$adress); ?>
But unfortunately its not possible to call javascript before headers 🙁
Any idea how to solve this?
No: you will need to do the redirection in Javascript as well:
You can only manipulate
localstoragewith Javascript, and if you send theLocationheader with PHP the Javascript will not be executed.