title: Preventing cache of inline PDF
body: <p>I am trying to prevent caching of an inline PDF file using the following code (adapted from CodeIgniter's <a href="http://codeigniter.com/user_guide/helpers/download_helper.html" rel="nofollow">download helper</a>):</p>
  
  <pre><code>if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
      header('Content-Type: application/pdf');
      header('Content-Disposition: inline; filename="'.$this-&gt;folder_name($report['Report_Name']).'.pdf"');
      header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
      header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
      header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
      header('Content-Transfer-Encoding: binary');
      header('Pragma: public');
      header('Content-Length: ' . filesize($file . ".pdf"));
  }
  else {
      header('Content-Type: application/pdf');
      header('Content-Disposition: inline; filename="'.$this-&gt;folder_name($report['Report_Name']).'.pdf"');
      header('Content-Transfer-Encoding: binary');
      header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
      header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
      header('Pragma: no-cache');
      header('Content-Length: ' . filesize($file . ".pdf"));
  }
  
  readfile($file . ".pdf");
  exit();
  </code></pre>
  
  <p>Can anyone spot if these headers might cause any issues in IE or any browser, such as conflicts?</p>