| Author |
How to detect browser settings?
|
Chinh Tran Nam
Ranch Hand
Joined: Nov 08, 2004
Posts: 35
|
|
I got a strange requirement from my client to write a script (in Java, JSP, Javascript or whatever applicable for their JSP application) to check browser settings (IE) to see if it's configured as they need. Here are some settings it has to check: - Browser version - JVM version - Cache Settings - Font settings - Security Settings: ActiveX control and plug-in? - ... and other system settings like Regional settings, Folder Options,... Please let me know how to deal with this? Thanks in advance.
|
 |
Pradeep LV
Greenhorn
Joined: Nov 05, 2004
Posts: 8
|
|
To check the browser version, here is the function written is Javascript function CheckBrowser() { // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1))); if (this.nav) { BrowserType='NS'; } this.ie = (agt.indexOf("msie") != -1); if (this.ie) { BrowserType='IE'; } if (agt.indexOf("netscape6")!=-1) { BrowserType='NS6'; } get_os(); }
|
 |
Tina Long
Ranch Hand
Joined: Mar 04, 2005
Posts: 36
|
|
You can look at the request header information. You can read about that in the online book found at: Core Servlets and Java Server Pages The other thing you can look at is system properties. There is alot of information stored in all those properties.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
http://webreference.com/tools/browser/javascript.html Eric
|
 |
 |
|
|
subject: How to detect browser settings?
|
|
|