Hello:
Does anyone know how to clear a user's cache in php?
Thanks in advance - Pavilion
Clear the user's cache
Moderator: General Moderators
Re: Clear the user's cache
You can't. You can prevent your site from being cached using Cache-Control, if that's what you mean.
Re: Clear the user's cache
Hello Celauran:
Here is an outline of my problem. Maybe there is a better solution than clearing the user's cache.
One other thorn in this particular thicket is that I don't want to completely stop the caching process because it is possible for a user to select contacts in the address book, move to another portion of the page (that does not display until called) and then want to move back to the original portion and recheck new contacts (without loosing originally checked contacts).
So... unless I'm mis-understanding the caching process, I need to find a way to clear the cache at selected times.
Any thoughts you have on the problem are certainly welcome.
Thanks Much:
Pavillion
Here is an outline of my problem. Maybe there is a better solution than clearing the user's cache.
- My address book page allows the user to:
- Upload CSV address book files - This is task is run through the typical $_POST method action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"
- Delete address book contacts - using jQuery posts
- update contacts - using jQuery posts
- Add single contacts - using jQuery posts
One other thorn in this particular thicket is that I don't want to completely stop the caching process because it is possible for a user to select contacts in the address book, move to another portion of the page (that does not display until called) and then want to move back to the original portion and recheck new contacts (without loosing originally checked contacts).
So... unless I'm mis-understanding the caching process, I need to find a way to clear the cache at selected times.
Any thoughts you have on the problem are certainly welcome.
Thanks Much:
Pavillion
Re: Clear the user's cache
Hello Celauran:
I think I figured it out:
At the end of my csv upload procedures I've inserted the following php script:
Inserting the above script solves the problem (at least as far as I can see). I can upload CSV files, then check selected individuals (one-by-one) and delete them. If there is something off with my solution, please let me know. I'd rather not run into bigger problems down the road, simply because I went about things the wrong way.
Thanks Much - Pavilion
I think I figured it out:
At the end of my csv upload procedures I've inserted the following php script:
Code: Select all
$page = $_SERVER['PHP_SELF'];
header("Location: $page");Thanks Much - Pavilion