Hi guys!
How can I expire a webpage whenever the user hit back, forward & refresh (in php)?
Thanks!
Expire a Webpage
Moderator: General Moderators
Re: Expire a Webpage
Did you mean to expire a session?
Re: Expire a Webpage
You can't really do this, since the page is generally loaded from cache.
You can send a no cache header and then check the referrer...but why? What's the point?
You can send a no cache header and then check the referrer...but why? What's the point?
Re: Expire a Webpage
I'm doing a login page
and I don't want the user to go back to the login page
after they have already logged in.
and I don't want the user to go back to the login page
after they have already logged in.
Re: Expire a Webpage
Then yeah, I suppose you can tell the browser not to cache the page, and if the user is logged in already, redirect or something.
Re: Expire a Webpage
by setting the php.ini file i had
session.cache_limiter = nocache
However it still seems to be caching the inputs i entered. Any idea how to solve it?
session.cache_limiter = nocache
However it still seems to be caching the inputs i entered. Any idea how to solve it?
-
Marinusjvv
- Forum Commoner
- Posts: 29
- Joined: Wed Dec 02, 2009 5:59 am
Re: Expire a Webpage
How about creating a session variable that you set to 'true' when logged in. Eg:
then, on the top of your login page:
Code: Select all
if($password == $_REQUEST["password"])
{
$_SESSION["logged_in"] = true;
}Code: Select all
if($_SESSION["logged_in"] == true)
{
// redirect to watever page
}