title: Force download in Codeigniter then stay with the thanks page
body: <p>I have a form , when i validate i want to redirect the user to the thank you page then force download the file 
  what is happening here is redirect the user to the download page ( blank page ) then download start .. and when i remove the 'refresh' from redirect function it download the file instantaneously 
  here is my code </p>
  
  <p><strong>controller</strong></p>
  
  <pre><code>public function index()
  {
  
      if ($this-&gt;form_validation-&gt;run('price') == FALSE) {
          // Validation problems 
          $this-&gt;load-&gt;view('control_front', array('page' =&gt; 'price'));
      }
      else
      {   
  
          redirect('price/thanks', 'refresh');
      }
  }
  public function download()
  {
  
      $this-&gt;load-&gt;helper('download');
      $data = file_get_contents("./uploads/price-list-2013.pdf"); // Read the file's contents
      $name = 'pricelist.pdf';
  
      force_download($name, $data);
              // doesn't go the view page
      $this-&gt;load-&gt;view('control_front', array('page' =&gt; 'thanks'));
  
  }
  </code></pre>
  
  <p>What i need to do here is to load the thank you page then the force download .. how can i do that ? </p>