Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7192990

regression: deployJava.js detects aol browser incorrectly as Netscape

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 7u6
    • deploy
    • b56
    • x86
    • windows_7
    • Verified

        AOL development team reported:

        A DESCRIPTION OF THE PROBLEM :
        I am with AOL Desktop development. The latest version of the Java detection code at http://www.java.com/js/deployJava.js is detecting AOL Desktop as Netscape. This is incorrect and should be MSIE (we use IE for internal web browsing). This incorrect logic is breaking Pogo and other sites within our AOL Desktop product. When the sites are checking if Java is installed, the detection fails and the sites think that Java is not installed (when it is) and prompt user to install Java again. So any checks for “america online” and “aol” in the user agent should be removed and allow for the correct rendering engine check to decide the browser type. We are not sure why the check is there. The issue showed up in the past week."

        Text version of deployJava.js:
        http://www.java.com/js/deployJava.txt

        AOL related detection in deployJava.txt on August 21, 2012

            getBrowser: function() {

                if (this.browserName == null) {
                    var browser = navigator.userAgent.toLowerCase();

                    log('[getBrowser()] navigator.userAgent.toLowerCase() -> ' + browser);


                    // order is important here. Safari userAgent contains mozilla,
                    // and Chrome userAgent contains both mozilla and safari.
                    if ((browser.indexOf('msie') != -1) && (browser.indexOf('opera') == -1)
                            && (browser.indexOf('america online') == -1)
                            && (browser.indexOf('aol') == -1)) {
                        this.browserName = 'MSIE';
                        this.browserName2 = 'MSIE';
                    } else if (browser.indexOf('iphone') != -1) {
                        // this included both iPhone and iPad
                        this.browserName = 'Netscape Family';
                        this.browserName2 = 'iPhone';
                    } else if ((browser.indexOf('firefox') != -1) && (browser.indexOf('opera') == -1)
                            && (browser.indexOf('america online') == -1)
                            && (browser.indexOf('aol') == -1)) {
                        this.browserName = 'Netscape Family';
                        this.browserName2 = 'Firefox';
                    } else if (browser.indexOf('chrome') != -1) {
                        this.browserName = 'Netscape Family';
                        this.browserName2 = 'Chrome';
                    } else if (browser.indexOf('safari') != -1) {
                        this.browserName = 'Netscape Family';
                        this.browserName2 = 'Safari';
                    } else if ((browser.indexOf('mozilla') != -1) && (browser.indexOf('opera') == -1)) {
                        this.browserName = 'Netscape Family';
                        this.browserName2 = 'Other';
                    } else if (browser.indexOf('opera') != -1) {
                        this.browserName = 'Netscape Family';
                        this.browserName2 = 'Opera';
                    } else {
                        this.browserName = '?';
                        this.browserName2 = 'unknown';

              igor Igor Nekrestyanov (Inactive)
              sharehma Shakeel Rehman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: