Search code examples
javascriptinternet-explorergoogle-chrome-frame

Is Google Chrome Frame Installed and Enabled?


How can I detect whether Google Chrome Frame (GCF) is installed and enabled? Any javascript or css type solution is welcome. (Strict no-bloat policy against using other frameworks and downloads.)

I am building a website that uses HTML 5 features, not all of which are supported by Microsoft Internet Explorer < v10 (at least). I have a check (javascript) for MSIE 9 or earlier, but this alone would be bad if GCF is installed. If GCF is installed and enabled, the application should go on its merry way without concern for the fact that it's running in MSIE.

I've been googling and it looks like navigation.plugins() might provide a solution, but then I need more information to check specifically for GCF; so I don't yet know how to use it. As suggested above, I'm not limiting answers to navigation.plugins(). I'm just saying that's as far as I've gotten on my own; so, if you know how to reference this specific plugin, it's a possible solution.


Solution

  • I have to schedule my own tests for later, but at present; it appears I have confirmation for Waleed Khan's answer in comments below the question. The User Agent will return a string that contains the term "chromeframe." That seems to be spot on for what I need. I only need to check if the browser is MSIE < 10, and I already have a check for that. Should be fast (I presume) and seems to cover all the necessary bases.