I have a login page than involved destroying a session and starting a new one. I have very inconsistent results between both Chrome and Firefox.

I am clearing the session using:

```
session_unset();
session_destroy();
session_start();
$_SESSION = array(); 

```

But variables in the session seem to still exist until I refresh the page and then they disappear. My second problem ontop of this is that crucial $\_SESSION variables are different on ajax pages called from this login page. This is causing big problems and inconsistent results on ajax pages.

**What is the best way to destroy a session and set it with fresh variables that will be available to ajax pages?**