odd problem: mozilla and netscape different javascript error

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

Moderator: Don_HH2K

odd problem: mozilla and netscape different javascript error

Postby vip007 » Mon 23 Feb, 2004 6:08 pm

I have this odd problem: a site was designed for IE and also allows netscape browser (limited functionallity). However, if I try to use mozilla (or firefox for that matter) the functionality breaks down. I traced it down to some javascript problems. In Netscape (7.0/7.1) it reports a js error but the overall thing works. In Mozilla it reports a different error and that, apparently, breaks down the script.

I am just a user who needs to use that site and would rather use Firefox than Netscape. Are there differences between js implementations in Netscape and Mozilla?
UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20040107
vip007
new member
new member
 
Posts: 1
Joined: Mon 23 Feb, 2004 6:01 pm

Postby akbash » Mon 23 Feb, 2004 9:07 pm

Netscape and Mozilla have identical script engines, except for some bug fixes. But they do identify themselves with distinct User Agent strings. I think it's likely the website is misidentifying Mozilla as IE. Perhaps they're searching the UA string for "Netscape". It's something of a black art, correctly identifying the browser. At least they're trying.

If this website is visible to the public, and I'm right about the cause of the problem, you may want to file an evangelism bug with the Mozilla people. Go to Bugzilla, click "Enter a new bug report", and then "Tech Evangelism". It's not as if Mozilla has a huge staff of intimidating telephone operators poised around the bat-pole. But on a good day Mozilla will send a fix to the website's authors, who will respond "gosh, thanks." I've seen it happen.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040223
akbash
silver member
silver member
 
Posts: 364
Joined: Mon 09 Feb, 2004 9:13 pm

Postby Alice » Mon 23 Feb, 2004 9:16 pm

I don't know too much about javascript but my guess is that the differences you see using Netsape 7.xx versus Mozilla 1.xx or Firefox is due to HOW the particular site is detecting the browser version. See http://devedge.netscape.com/viewsource/ ... detection/

If it is impossible to get the website to change it's detection method then you could try spoofing your useragent string to whichever Gecko-based browser is working better on that site. I would do some reseasrch beforehand but you can get the uabar from http://uabar.mozdev.org/source.html or try a UA switcher from http://extensionroom.mozdev.org/

These pages should also be helpful:
http://devedge.netscape.com/viewsource/ ... atibility/
http://devedge.netscape.com/viewsource/ ... t-strings/
http://www.mozilla.org/docs/web-developer/faq.html
UserAgent: Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.6) Gecko/20040113
User avatar
Alice
Mozilla Champion
Mozilla Champion
 
Posts: 1790
Joined: Sun 21 Jul, 2002 8:57 am


Return to Web Design and Page Coding

Who is online

Registered users: Google [Bot], Majestic-12 [Bot], Yahoo [Bot]