I would like to use the following code for visitors that are not logged in:
session_name( "session_id" );
session_cache_limiter ('private, must-revalidate');
$cache_limiter = session_cache_limiter();
session_cache_expire(15); // in minutes
session_start();
When I visitor visits a page within 15 minutes for the second time the page will be loaded from the browser cache.
Note: I only use the above code when a visitor is not logged in.
The above is working fine, but I have a problem with visitors after they login.
After login pages should not be loaded from the browser cache. I have tried using "session_destroy();" (see: www.php.net/manual/en/function.session-destroy.php and scroll down to user "iam4webwork") but that did not I work. Pages are still loaded from the browser cache.
What code should I use directly after some logs in to prevent page from caching?