title: Tablet can't download .apk file in some browsers
body: <p>I am trying to download an apk file from my website and it works on every android phone (downloads and installs). I tried this on a Galaxy Tab 3 and it failed to just download the file. It shows that its downloading but its stuck on the progress bar forever and never downloads. It failed with these browsers:</p>
  
  <ul>
  <li>Default Android Browser</li>
  <li>Chrome</li>
  <li>Dolphin</li>
  </ul>
  
  <p>I tried it with Firefox and Firefox worked. It downloaded successfully and I was able to install it successfully after. So it does work (plus it worked on the phones I tested)</p>
  
  <p>I thought maybe it had something to do with the mimetype so I checked that out and while inspecting the headers Content-Type I noticed it was "application/vnd.android.package-archive". This is the mime type according to <a href="http://en.wikipedia.org/wiki/APK_(file_format)" rel="noreferrer">Wikipedia</a></p>
  
  <p>So just for safe measures I added this to my htaccess file</p>
  
  <pre><code>AddType application/vnd.android.package-archive .apk
  </code></pre>
  
  <p>It still failed.</p>
  
  <p>I then tried this test on the following test site url and I was able to download it just fine on all browsers.</p>
  
  <p><a href="http://misc.commonsware.com/Now-debug.apk" rel="noreferrer">http://misc.commonsware.com/Now-debug.apk</a></p>
  
  <p>So I figured that maybe because our site is in https that that might be the issue. I tested the same browsers with the "<a href="http://misc.commonsware.com/Now-debug.apk" rel="noreferrer">http://misc.commonsware.com/Now-debug.apk</a>" url again except under https this time. It functioned the exact same way as it did on our site. All browsers except Firefox failed to download this. They just say downloading but nothing downloads. </p>
  
  <p>Now I assume that maybe this test site just wasn't setup for SSL to begin with (I don't know as I didn't setup the server) so thats why its failing on most tablet browsers. Is there some weird SSL setting that could be super picky with some of the tablet browsers? Or do most tablet browsers just suck and I have to deal with it? I really don't understand why download this apk file on ever browser besides the main ones on the tablet (except Firefox, that still works)</p>
  
  <p><strong>Update</strong></p>
  
  <p>The Firefox browser on my phone does not download the application either. So I have the Chrome browser on Galaxy Tab 3 not downloading but its working on my phone Nexus 5. Firefox downloads it on Galaxy Tab 3 but not on my Nexus 5.</p>
  
  <p>I setup remote developer tools on my desktop and connected to my phone for more info. My firefox browser makes a request to the url for download and receives the correct content-type <code>application/vnd.android.package-archive</code>.</p>
  
  <p>So I decided to create a script that forces the content-type to be <code>application/octet-stream</code> and download it through the php script. I managed to get this to work on my Nexus 5 Firefox browser however, all of the Galaxy Tab 3 browsers still do not work. It was a very minor breakthrough but maybe it hints to what the problem could be.</p>