Bug Tracker

Modify

Ticket #4754 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

jQuery 1.2.6 reports wrong browser version.

Reported by: a6hi5h3k Owned by: joern
Priority: major Milestone:
Component: web Version: 1.2.6
Keywords: browser, version Cc:
Blocking: Blocked by:

Description

In jquery-1.2.6.js, it tries to extract the browser version from navigator.userAgent

version = (navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ )
[])[1];

My version of IE, gives following value for userAgent:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;  http://bsalsa.com); .NET CLR 1.1.4322; .NET CLR 2.0.50727

As it says, its IE 7, but the eager fetching by the regex used, generates the value as 6.

As clearly mentioned in 1.3 release notes, jquery doesn't use browser detection anymore. But since my guess is, most of users might have not yet upgraded to it, so thought of reporting it.

Change History

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #2661.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.