Bug Tracker

Opened 11 years ago

Closed 10 years ago

#4579 closed feature (worksforme)

browser detection is used for more than feature detection

Reported by: achtung Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

Browser detection should remain a part of jQuery core, until such time that jQuery can properly tell calling scripts which bugs to work around, and all features a browser supports.

For example, location.hash on Safari 3 behaves in an odd fashion when the hash is empty, such that it returns the host. Because of varying browser behaviors, checking just the value returned from location.hash wouldn't be enough. Some browsers return the bits after the hash, and some include the hash.

Change History (2)

comment:1 Changed 11 years ago by subtlegradient

Sounds like a need for both a fixed-hash-getting function and a browser detection plugin. Maybe instead of removal from core altogether it just gets rolled into an optional plugin?

comment:2 Changed 10 years ago by dmethvin

Resolution: worksforme
Status: newclosed

From experience we've found that $.browser means different things to different people and therefore isn't a good idea. For example if IE8 is running in IE7 mode, should it report IE8? Should $.browser indicate a difference between Safari on iMac and Safari on iPhone? And so on...

If you need to detect specific features or browsers, you're free to continue doing that in your own code.

Note: See TracTickets for help on using tickets.