Browser Detection
From BC$ MobileTV Wiki
(Redirected from Browser Detect)
Browser Detection (also called browser detect) is the process of using client and/or server technology to detect, store (i.e. for targeting/analytics purposes) and potentially vary the delivery of your application/site's user experience based upon the Browser and/or OS and its associated capabilities.
Tools
- Which Browser: https://whichbrowser.net/
- JavaScript -- Browser Detect: http://www.quirksmode.org/js/detect.html
- PHP -- Full Featured Browser Detection & OS Detection: http://techpatterns.com/downloads/php_browser_detection.php (also includes some lighter weight JS exmaples)[1]
- JSP -- Browser Detection library: http://uadetector.sourceforge.net/
- CSS -- Basic Mobile detection - Android .vs. iOS (iPod/iPad/iPhone) CSS Hacks test page: http://jeffclayton.github.io/css_hack_testing/android_vs_ipad_iphone.html[2]
Resources
- Browser Hacks: http://browserhacks.com/[3][4][5][6]
- HTTP 1.1 -- Header Field Definitions: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
- Browser detection using the user agent: http://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
- Detect Mobile Browsers: http://detectmobilebrowsers.com (OSS mobile phone detection examples in multiple languages such as: JS, Java/JSP, PHP, C#, ASP/ASP.net, Perl, Python, Ruby, Apache, nginx, etc)
- Detect Mobile Browsers - script: https://detectmobilebrowsers.mobi/ | SRC (PHP) | SRC (JS) (PHP & JS examples)
- Quirksmode -- Browser detect API: https://www.quirksmode.org/js/detect.html
- What Is My Browser -- API docs - List of User Agents: https://developers.whatismybrowser.com/useragents/explore/
- Device Atlas -- API docs - List of User Agent strings: https://deviceatlas.com/blog/list-of-user-agent-strings
- Platform.js: https://github.com/bestiejs/platform.js | SRC (platform detection library that works on nearly all JavaScript platforms)
- ScientiaMobile -- WURFL Microservice - SDK client in Java: https://github.com/WURFL/wurfl-microservice-client-java
- Device Detection for Apple iPhone & iPad: https://51degrees.com/Blog/device-detection-for-apple-iphone-and-ipad
- 51Degrees Open Sources GPU Renderer Technique to Identify Apple Devices Using iOS 12.2 or Higher: https://51degrees.com/blog/51degrees-open-sources-gpu-renderer-technique-to-identify-apple-devices-using-ios-122-or-higher
- JS Fiddle -- bcmoney - JS Device/OS/Browser/Resolution detection example: https://jsfiddle.net/bcmoney/aV39w/
Tutorials
- JS Browser Detection tutorial: http://www.echoecho.com/jsbrowserdetection02.htm
- Lightweight Device-Detection in PHP: http://mobiforge.com/design-development/lightweight-device-detection-php
- PHP basic browser info detection from HTTP_USER_AGENT: http://www.hackingwithphp.com/16/5/0/browser-detection
- PHP Browser Detection tutorial: https://code.tutsplus.com/tutorials/mobile-browser-detection--mobile-2340
- How To Detect Browser in PHP: http://www.ptutorial.com/php-example/php-browser
- How to get browser information in JSP?: http://stackoverflow.com/questions/1373029/how-to-get-browser-information-in-jsp
- Browser detection from server with Java: http://stackoverflow.com/questions/29508423/browser-detection-from-server-with-java
- Detecting a mobile browser: https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser
- Detect Mobile Phones: http://www.andymoore.info/php-to-detect-mobile-phones/
- Detecting Mobile Devices with JavaScript: https://www.abeautifulsite.net/posts/detecting-mobile-devices-with-javascript/
- Detecting device brand: https://stackoverflow.com/questions/16356347/detecting-device-brand
External Links
- wikipedia: Browser sniffing
- wikipedia: Charset detection
- wikipedia: Content sniffing (aka. data type determination)
- Content negotiation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation
References
- ↑ Wolfcast Browser - Detection PHP class: http://github.com/Wolfcast/BrowserDetection
- ↑ CSS Hack to Target Anything but iOS (Androids, but not iPads/iPhones): https://jeffclayton.wordpress.com/2014/07/28/css-hack-anything-but-ios/
- ↑ What will be the maximum width of tablet to use in media query?: https://stackoverflow.com/questions/26419863/what-will-be-the-maximum-width-of-tablet-to-use-in-media-query
- ↑ Media Queries Demystified -- CSS Min-Width and Max-Width: https://www.emailonacid.com/blog/article/email-development/emailology_media_queries_demystified_min-width_and_max-width/
- ↑ CSS media queries -- max-width OR max-height: https://stackoverflow.com/questions/11404744/css-media-queries-max-width-or-max-height
- ↑ CSS hack only for apple iphone: https://stackoverflow.com/questions/34650841/css-hack-only-for-apple-iphone
- ↑ How do detect Android Tablets in general. Useragent?: https://stackoverflow.com/questions/5341637/how-do-detect-android-tablets-in-general-useragent
See Also
Device/OS/Browser | User-Agent | GeoIP | BT | Progressive Enhancement | Responsive | Mobile Web Design | WURFL