How can I detect browser support of Flash in JavaScript?

11,523

I would use one of the Flash Detection JavaScript libraries out there. This one works well.

Share:
11,523
Vipul Vaghasiya
Author by

Vipul Vaghasiya

i am web developer.

Updated on June 04, 2022

Comments

  • Vipul Vaghasiya
    Vipul Vaghasiya almost 2 years

    This my HTML code but if the browser does not support Flash then I want to replace the image in the Flash part

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
        <script type="text/javascript">
          if (typeof navigator.plugins['Shockwave Flash'] !== 'undefined') {
            alert('support');
          } else {
            alert('not support');
          }
        </script>
      </head>
    
      <body>
      </body>
    </html>