title: A way around the "Safari cannot download this file" error on iOS
body: <p>Since iOS has no user visible file structure, downloading most files in iOS Safari results in the popup error "Safari cannot download this file". This only happens for file formats that Safari doesn't know how to handle. It seems to do fine with various image formats and such.</p>
  
  <p>My specific questions:</p>
  
  <ol>
  <li><p>Is there a way to tell whether a given file format is supported by iOS Safari using JavaScript?</p></li>
  <li><p>Can you intercept the error message (again in JavaScript) and change it to something else?</p></li>
  </ol>
  
  <p>If I could change the error message I could say something like go download the Google Drive or Dropbox app (which would then let the user download the file to their cloud). In general, is there any other way to make Safari web downloads on iPad friendlier to users as the owner of a website? Ideally a client-side JavaScript solution.</p>