Reputation: 913
After submit my registration form, i execute the insert functions for added new records into database and redirect to listing page. in the listing page i have not see the newly added records, but its in the database. once i refresh the browser (Ctrl+F5) its shown in the listing page.
What is the problem? actually i try to remove the cache file while listing the data by using the blow code
$this->output->clear_cache();
but its not working for me. anybody know the solution for this issue?
Upvotes: 0
Views: 82
Reputation: 502
Try the following code within constructor
$this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
$this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
$this->output->set_header('Pragma: no-cache');
$this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Upvotes: 4