views:

630

answers:

3

Is is possible to query the current browser from within an applet?

I would like to know if the current browser is IE6 or IE7.

+1  A: 

Here's something for ya: http://www.rgagnon.com/javadetails/java-0160.html

Filip Ekberg
+1  A: 

User-Agent detection code is quite old (stops at IE6) but should be easily extended. Should be combined with R. Gagnon code pointed by Filip, for better detection of real browser (some browsers allows to alter user agent string at will).
You might be interested by the List of User Agent Strings too.

PhiLho
A: 

For information, the User-Agent detection code has been updated with the latest browsers.