View Full Version : Detecting browser settings

08-03-2007, 07:53 AM
Hi All,

Is there any way to detect certain browser settings such as "user datapersistence", "disable script debugging", found under Tools -> Internet Options -> Advanced Tab on IE in Javascript.

Thanks in Advance.


08-03-2007, 08:20 AM

08-03-2007, 08:31 AM

08-03-2007, 08:42 AM

But in Java, Can we do that?

I found one from the web BrowserHawk.
http://www.cyscape.com Go for details.

But the above said properties that is "user datapersistence", "disable script debugging" cannot be detected by this.

So, Any one have any idea how to detect the above properties.

I am also putting this topic in Java thread.



08-03-2007, 09:08 AM
There is no straightforward method of detecting these things using javascript, at least none that I know of. However, it might be better to approach the situation on the basis of why you would want to. What is it that you can or cannot do in your script if these things are enabled/disabled? There is almost always a way to get around limitations, or at the very least, you can post a notice that your page works better with such and such turned on or off.

For example, if your code depends on something being on, you can do a:

try {
dependant code here
alternative code here

This will usually have the effect of disabling debugging for the code in the try section, even if it is enabled in the browser, and it is also a method to try something out and take another path if things won't work. If you want your code to degrade well in browsers that do not support try/catch, this is an oversimplification, but it gives you an idea of what can be done. Also, all modern browsers do support try/catch.