Coordinator reload page after deleting record and cache problem

Hi all,
i am just new to codignitor. i am tyring the delete records lesson from a table using non ajax. my problem is, after deleting the record, the page loads again correctly. but the deleted record is still showing up. i have to refresh manually the page again one more time to get a fresh copy.

image

Controller code related to view and delete records are given below.

    public function view() {
         //load the database  
         $this->load->database();  
         //load the model  
         $this->load->model('Customers_model');  
         //load the method of model  
         $data['h']=$this->Customers_model->view();   
         //return the data in view  
         $this->load->view('header');
         $this->load->view('customers/view', $data);
         $this->load->view('footer');         
    }    
 
    public function delete() {
        $customer_id=$this->uri->segment(3);
        $this->load->model('Customers_model'); 
        $this->Customers_model->delete($customer_id); 
        //redirect(base_url() . "index.php/customers/view", "refresh");
        redirect("customers/view");
    }

does it actually delete the record?

yes in deed, but i have to manually refresh the page to again show the new list without that record.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.