devxlogo

Detecting Browser Plug-Ins

Detecting Browser Plug-Ins

Browser plug-ins, such as RealPlayer, Shockwave/Flash, Quicktime, and others, can add multimedia functionality to a Web site and help attract and retain visitors. If a particular visitor doesn’t have a particular plug-in, however, the savvy Web designer will want to provide a different experience–an animated GIF, a Netscape sound, or something along those lines. It’s possible to detect the presence or absence of any known plug-in with a JavaScript function, and then deliver content appropriately:

     function detect_plugin(name)  {             if (navigator.plugins[name]) return true;             else return false;         }

Just use a simple if statement with the name of the plug-in to put the function to work:

          if (detect_plugin("Beatnik") == true)              document.write("Beatnik code goes here");         else document.write("No Beatnik - do something else");
See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist