4

I know there are a bunch of posts asking this question, but all of the answers point to either swfobject or the flash detection kit.

Is there a simple one or two liner in JavaScript just to check if Flash is installed or not? I don't want to have to include a whole js library if there's an simple way to do this.

pepsi
  • 6,785
  • 6
  • 42
  • 74
  • 7
    see http://stackoverflow.com/questions/998245/how-can-i-detect-if-flash-is-installed-and-if-not-display-a-hidden-div-that-info – Horst Walter Aug 16 '11 at 17:05
  • @Horst: Thanks.. that's what I'm looking for. Do you know if there are there any gotchas with this? Cross browser compatibility? – pepsi Aug 16 '11 at 17:32
  • Nothing right now which is additional to the comments in the above question. I only remember that when we have used it we had combined two checks for some reasons I cannot recall. This was prior the iPad age, nowadays I'd check against the common [x]Pads if these are among the target audience. Maybe you combine the Flash and Browser check, e.g. once you know the browser is SAFARI/iPad you know it is not supporting Flash. – Horst Walter Aug 16 '11 at 17:56
  • @Horst: Thanks. If you put this as an answer, I'll mark it accepted – pepsi Aug 16 '11 at 18:01
  • I have summarized the comments in answer – Horst Walter Aug 16 '11 at 18:18

2 Answers2

2

As a summary of the above comments as requested:

The following SO answer is applicable: How can I detect if Flash is installed and if not, display a hidden div that informs the user?

Especially the comments / discussion of the above question are useful. I only remember that when we have used a Flash check we had combined two checks for some reasons I cannot recall. This was prior the iPad age, nowadays I'd check against the common [x]Pads if these are among the target audience. Maybe you combine the Flash and Browser check, e.g. once you know the browser is SAFARI/iPad you know it is not supporting Flash.

Try to encapsulate the check so you can change / extend it if required (that was useful for us).

Community
  • 1
  • 1
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
0

http://www.featureblend.com/flash_detect_1-0-4/flash_detect.js

I know you've seen it before; that's because it works.

Miriam
  • 969
  • 1
  • 6
  • 15
  • What's the benefit of this over http://stackoverflow.com/questions/998245/how-can-i-detect-if-flash-is-installed-and-if-not-display-a-hidden-div-that-info/3336320#3336320? – pepsi Aug 16 '11 at 17:31
  • To the best of my knowledge, it's better because it checks activeX and therefore works in IE7. – Miriam Aug 16 '11 at 17:32
  • The best link is http://www.featureblend.com/javascript-flash-detection-library.html – insign Sep 13 '13 at 04:18