Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:2 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to worksforme
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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?