Here you can use a small hack.
Make a simple flash movie as3 and make a call
try { navigateToURL(new URLRequest("javascript:flashCheck()"),"_self"); } catch (e:Error){}
after which you can write a simple validation function in javascript (flashCheck () {}).
You know that this function is only available for as3 (swf), so you can determine what you need.
Hope this helps.
ps
and I'm sure you can do this trick with silverlight.
source share