so I call the zend auth clear identity function through ajax and if the ajax returns true (ie the identity got cleared), i just reload the browser through location.reload()
and what usually happens is that the page has the following:
if ($this->auth->hasIdentity()) {
echo "Welcome";
}
and
if (!$this->auth->hasIdentity()) {
echo "some login form";
}
but then since the page is cached by the browser....even though I've called the logout script through ajax (which clears the identity) and reload the page, the page still displays the welcome screen since it thinks that the page hasn't changed and so just displays the cache which contains the welcome screen rather than the login form when it's reloaded......
is there away to clear the cache manually or some sort using jquery so that it won't just load up the cache when reloaded?