title: Detecting support for "application/pdf" in Microsoft Edge
body: <p>Our site tries to detect support for the <code>application/pdf</code> mimetype via a check like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function isPdfMimeTypeSupported() {
    if (navigator.mimeTypes != null &amp;&amp; navigator.mimeTypes.length &gt; 0)
      for (i = 0; i &lt; navigator.mimeTypes.length; i++) {
        var mtype = navigator.mimeTypes[i];
        if (mtype.type == "application/pdf" &amp;&amp; mtype.enabledPlugin)
          return true;
      }
    return false;
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>This works as expected in Chrome however in Microsoft Edge the mimeTypes collection only has two entries:</p>
  
  <ul>
  <li>"application/x-shockwave-flash"</li>
  <li>"application/futuresplash"</li>
  </ul>
  
  <p>The check fails and we are incorrectly warning the user that their browser doesn't support PDF. </p>
  
  <p>If there a way to check for PDF support in JavaScript that works in Edge? </p>