Skip to main content

Bug Tracker

Side navigation

#4579 closed feature (worksforme)

Opened April 23, 2009 01:15AM UTC

Closed June 12, 2010 06:30PM UTC

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:

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.

Attachments (0)
Change History (2)

Changed April 23, 2009 04:59AM UTC by subtlegradient comment:1

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?

Changed June 12, 2010 06:30PM UTC by dmethvin comment:2

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.