Opened 9 years ago
Closed 7 years ago
#1303 closed defect (bug) (fixed)
Browse Happy API detection bugs
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Browse Happy | Keywords: | needs-patch |
Cc: |
Description (last modified by )
Migrated from: https://core.trac.wordpress.org/ticket/18281 per https://core.trac.wordpress.org/ticket/18281#comment:15
A few bugs we've noticed with the Browse Happy API so far:
- Mobile versions need to be labeled as such. Specifically, Mobile Safari, Opera Mini, and the Galaxy tablet, I believe. This should mean that the browser doesn't match with our list of five.
- For IE, we need to be looking at the Trident version numbers. Problem is, IE9 might be using a compatibility UA, which means it would get identified as IE7. Trident/5.0 is IE9, Trident/4.0 is using IE8.
I think the architecture of the API code needs some love. It served its purpose, but it's a bit inflexible for expansion. (See the Kindle hack and such.)
I'm going to open source this code onto http://code.svn.wordpress.org. It would be fantastic if some people can contribute to it and make it the best possible.
Change History (9)
#2
@
9 years ago
- Description modified (diff)
Restored original ticket formatting for improved readability.
#4
in reply to:
↑ 1
@
9 years ago
Replying to samuelsidler:
Code is here: https://meta.trac.wordpress.org/browser/sites/trunk/browsehappy.com/public_html
That's just code for the browsehappy.com site itself. Looks like the API is not open sourced yet.
#9
@
7 years ago
- Resolution set to fixed
- Status changed from new to closed
Fixed over a long series of commits outlined below (yes, in hindsight, I should have referenced this ticket in the commits as a tracking ticket). Any further suggestions should be opened in new tickets.
- New non-mobile browser detection:
- Add detection for Microsoft Edge [5974]
- Add detection for UC Browser [5991]
- Add detection for QQ Browser [5995]
- Add detection for Pale Moon [6012]
- Add detection for Vivaldi [6019]
- Add support for FreeBSD, OpenBSD, and SunOS as platforms and Konqueror as a browser [6017]
- Add detection for SeaMonkey [6018]
- Add detection for Puffin [6020]
- Add detection for Chromium [6021]
- IE:
- Opera:
- Improve detection and recognize modern Opera user-agents [5963]
- Safari:
- Bump current version of Safari to 11 and mark versions earlier than 10 as insecure [5975]
- Firefox:
- Bump current version of Firefox to 56 and mark versions earlier than 52 (latest Extended Support Release) as insecure. [5976]
- Chrome:
- Fix Chrome user-agent parsing when an explicit 'Version/' value is defined, which in this case shouldn't be used. [5967]
- Mobile browser handling:
- Add data attribute 'mobile' to indicate if a given parsed user-agent is mobile. Generic mobile platform is set as "Mobile". [5962]
- Replace hack to more clearly handle not making alerts for mobile browsers [5951]
- Fix attribution of platform as Android instead of Linux [5952]
- Improve Windows Phone OS recognition, particularly for more modern Microsoft browsers [5971]
- Rename "Kindle" to "Kindle Browser" and remove Kindle hack [5984]
- Improve identification of BlackBerry, Nokia, and Sony Ericsson devices generically as mobile devices if platform not otherwise known [5988]
- Add detection for Amazon Silk as a browser and Fire OS as a platform [5984]
- Add detection for Opera Mini [5963]
- Add detection for Android Browser. Fixes some existing misattributed unit test cases. [5977]
- Add detection for Nokia Browser [5979]
- Add detection for BlackBerry Browser [5989]
- Add detection for Samsung Browser [5994]
- Add detection for Symbian as a platform and Ovi Browser as a browser [6011]
- Unit testing:
- Convert crude unit tests to PHPUnit [5948]
- Add unit test for 'insecure' flag [5949], [5968]
- Add unit test for the 'upgrade' parsed data field [5970]
- Group unit test data by browser type and order them alphanumerically by browser, then platform, then version. [5965]
- Add more unit test data [5954], [5966], [5981]
- Browser logo images improvements:
- Update logo images to current versions of each [13407-dotorg]
- Use CDN to serve images. [5947]
- Code formatting/docs:
- Misc
Code is here: https://meta.trac.wordpress.org/browser/sites/trunk/browsehappy.com/public_html