title: How to not cache a php file where a cachemanifest is beeing called?
body: <p>i'm building a iphone app with jqtouch and i use a cachemanifest to cache all the static files (images, css, javascript) to make it load faster. However the page uses php for the dynamic content and i don't want to cache that. So i'm generating the cachemanifest with this php-script(manifest.php):</p>
  
  <pre><code>&lt;?php
  header('Content-Type: text/cache-manifest');
  echo "CACHE MANIFEST\n";
  
  $hashes = "";
  $lastFileWasDynamic = FALSE;
  
  $dir = new RecursiveDirectoryIterator(".");
  foreach(new RecursiveIteratorIterator($dir) as $file) {
    if ($file-&gt;IsFile() &amp;&amp; $file != "./manifest.php" &amp;&amp;
      substr($file-&gt;getFilename(), 0, 1) != ".") {
      if(preg_match('/.php$/', $file)) {
        if(!$lastFileWasDynamic) {
          echo "\n\nNETWORK:\n";
        }
        $lastFileWasDynamic = TRUE;
      } else {
        if($lastFileWasDynamic) {
          echo "\n\nCACHE:\n";
          $lastFileWasDynamic = FALSE;
        }
      }
      echo $file . "\n";
      $hashes .= md5_file($file);
    }
  }
  
  echo "\nNETWORK:\nhttp://chart.apis.google.com/\n\n# Hash: " . md5($hashes) . "\n";
  ?&gt;
  </code></pre>
  
  <p>This actually works really good except for one irritating thing:</p>
  
  <p>From what i read somewhere the file that calls the cachemanifest is automaticly included in the manifest and is beeing cached. Wich means that my start-page index.php, where i call the cachemanifest is beeing cached. This leads to very irritating problems.</p>
  
  <p>is there any way to deal with this or any smart workaround? The page is in the cachemanifest listed as NETWORK, but it looks like this is beeing overruled by the fact that the cachemanifest is called from the file.</p>