title: What’s the difference between <a href="url"> and window.location = "url" on iOS?
body: <p>I have an HTML 5 app that runs on mobile devices including the iPad.  I want to create a link to a non-HTML file, and have the proper application open to handle the file.  The files are .acsm files, to be opened in Bluefire.</p>
  
  <p>If I create the link as a simple <code>&lt;a href="url"&gt;</code> tag, it works.</p>
  
  <p>If instead I use Javascript to set the <code>window.location</code>, it doesn't work.  The iPad pops an alert that says, "Download failed: This file cannot be downloaded".</p>
  
  <p>I've experimented with other file types, and haven't found anything conclusive.  What's the difference between the simple link and the Javascript technique?  Can I make the Javascript code do the same thing as the link?</p>
  
  <p>In case the specific Javascript details matter, I do it like this with jQuery:</p>
  
  <pre><code>$('.native-launch').live('click', function (evobj) {
    var there = $(evobj.target).attr('href');
    window.location.href = there;
    return false;
  });
  </code></pre>
  
  <p>and the HTML looks like:</p>
  
  <pre><code>&lt;span class="catalog-list-button native-launch" href="url"&gt;Read in another app&lt;/span&gt;
  </code></pre>
  
  <p>(Note that this is a span with an href, I can change the HTML if that would help.)</p>