title: Android appcache in android 2.2
body: <p>I'm writing an android app that makes use of WebViews, externally hosted js files, and a manifest file to control appcache. Everything seems to work fine in android 4, but in 2.2 the caching doesn't seem to work.</p>
  
  <p>The flow is as follows:</p>
  
  <ol>
  <li><p>Android app loads and loads a local html file into a webview.</p></li>
  <li><p>Local html files has some javascript to switch the window location to that of a remote 'bootstrap' file.</p></li>
  <li><p>Bootstrap file includes some javascript to download a javascript application and supporting CSS (by writing script/link tags into the dom), and the link to the remote manifest file (absolute URL, served from the same place as the bootstrap file and the application files).</p></li>
  <li><p>Application is downloaded, and renders to the screen.</p></li>
  </ol>
  
  <p>The manifest file looks like this:</p>
  
  <pre><code>CACHE MANIFEST
  #2012-04-12
  
  CACHE:
  mobile-css.css
  app-mobile.js
  app.js
  bootstrap.html
  </code></pre>
  
  <p>The problem I'm having is that in android 2.2 (HTC desireHD), when I change the manifest file, the app only re-downloads the bootstrap html file, and ignores the app-mobile.js and css files, and always uses the ones in cache. This works how I expected it to in android 4 (changing the manifest file re-downloads all the specified resources).</p>
  
  <p>I've run this in the emulator as well as the device, and the results are the same.</p>
  
  <p>Can anybody see what I'm doing wrong?</p>
  
  <p>Thanks in advance.</p>