Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Tablet, Chrome browser detection #24

Open
TheJaredWilcurt opened this issue Oct 22, 2013 · 2 comments
Open

Android Tablet, Chrome browser detection #24

TheJaredWilcurt opened this issue Oct 22, 2013 · 2 comments

Comments

@TheJaredWilcurt
Copy link

Firstly, can we get a way to detect the Blink rendering engine (as Chrome is switching from Webkit to Blink)?

I'm trying to target Chrome on the Tablet, I've tried .android.chrome, and .android.webkit, neither work. .android does work, but that targets all browsers, and the issue only occurs in the Chrome browser on Android.

I ran the tester.html file from the GitHub tests folder on the Samsung Galaxy Tab 10.1 in several browsers, here are the results.


Tablet: Samsung Galaxy Tab 10.1
Tablet Model: GT-P7510-MA16ARB
OS: Android 4.0.4; GT-P7510 Build IMM76D


Browser: Android (Stock) Browser 4
HTML Classes: android android4_0 device_gt_p7510 mobile linux lang_en lang_en_us js orientation_landscape maxw_1280 (orientation_portrait maxw_768)
UA: Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; GT-P7510 Build/IM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30


Browser: Chrome 30.0.1599.82
Blink Version: 537.36 (@158286)
HTML Classes: android device_gt_p7510 mobile linux js orientation_landscape maxw_1280 (orientation_portrait maxw_768)
UA: Mozilla/5.0 (Linux; Android 4.0.4; GT-P7510 Build/IM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.82 Safari/537.36


Browser: Firefox 24.0
HTML Classes: gecko firefox firefox24 firefox24_0 mobile js orientation_landscape maxw_1280 (orientation_portrait maxw_768)
UA: Mozilla/5.0 (Android; Tablet; rv:24.0) Gecko/24.0 Firefox/24.0


Browser: Opera Mobile
HTML Classes: android device_gt_p7510 mobile linux js orientation_landscape maxw_1280 (orientation_portrait maxw_768)
UA: Mozilla/5.0 (Linux; Android 4.0.4; GT-P7510 Build/IM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.72 Safari/537.36 OPR/16.0.1212.64462


Browser: Ninesky 2.5.1
HTML Classes: android android4 android4_0 device_gt_p7510 mobile linux lang_en lang_en_us js orientation_landscape maxw_1280 (orientation_portrait maxw_768)
UA: Mozilla/5.0 (Linux; U; Android 4.0.4; GT-P7510 Build/IM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30


Notice how you can't target .android.firefox, or .android.chrome or .android.webkit. Having these in the HTML Classes would be super useful.

I love this script by the way, I build it in to all the sites I make now. THANK YOU!


Edit: I made a simple page for my own use while testing browsers and devices with limited or no Dev Tools. Feel free to link to it on README.mkdn. It's hosted in my public Dropbox folder, I don't intend on ever deleting it.

@verbatim
Copy link
Collaborator

One of your example user agent strings::

Test Results: Mozilla/5.0 (Linux; Android 4.0.4; GT-P7510 Build/IM76D)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.82 Safari/537.36

According to Google engineers only the version number after Chrome will indicate Blink (http://www.youtube.com/watch?v=TlJob8K_OwE#t=22m11s)

First I need to find out what is the first Chrome version that is built on Blink before I can begin to update. Do you happen to know? The engineers mentioned Canary. I need to find out more information.

On Tuesday, October 22, 2013 4:41 PM, TheJaredWilcurt notifications@github.com wrote:

Firstly, can we get a way to detect the Blink rendering engine (as Chrome is switching from Webkit to Blink)?
I'm trying to target Chrome on the Tablet, I've tried .android.chrome, and .android.webkit, neither work. .android does work, but that targets all browsers, and the issue only occurs in the Chrome browser on Android.
I ran the tester.html file from the GitHub tests folder on the Samsung Galaxy Tab 10.1 in several browsers, here are the results.


Tablet: Samsung Galaxy Tab 10.1
Tablet Model: GT-P7510-MA16ARB
OS: Android 4.0.4; GT-P7510 Build IMM76D


Browser: Android (Stock) Browser 4
Test Results: Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; GT-P7510 Build/IM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 -


Browser: Chrome 30.0.1599.82
Blink Version: 537.36 (@158286)
Test Results: Mozilla/5.0 (Linux; Android 4.0.4; GT-P7510 Build/IM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.82 Safari/537.36


Browser: Firefox 24.0
Test Results: Mozilla/5.0 (Android; Tablet; rv:24.0) Gecko/24.0 Firefox/24.0 -


Browser: Opera Mobile
Test Results: Mozilla/5.0 (Linux; Android 4.0.4; GT-P7510 Build/IM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.72 Safari/537.36 OPR/16.0.1212.64462 -


Browser: Ninesky 2.5.1
Test Results: Mozilla/5.0 (Linux; U; Android 4.0.4; GT-P7510 Build/IM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 -


I really only care about being able to target the Chrome browser in this case, but I thought I might as well throw in the information for the other browser's too, in case they may be of use to making the script better.
I love this script by the way, I build it in to all the sites I make now. THANK YOU!

Reply to this email directly or view it on GitHub.

@TheJaredWilcurt
Copy link
Author

Chrome Canary is an install of Chrome that can run side-by-side with the standard install. It shows you a preview build of Chrome before it is officially released, so you can test out cutting edge websites to that use features that aren't in chome yet, but are scheduled to be in an upcoming version. Typically it's two versions ahead of the stable build. The current stable build of Chrome is at 30, all versions 28 and above use Blink.

I don't see targeting Blink over WebKit as making much of a difference now, but in the future as it diverges more and more from it's WebKit roots, this may become more important. So it would be cool to have in the CSS Browser Selector Script.

There would be much more use today for having better/more accurate targeting capabilities for Android Browsers, especially when the default browser and the Chrome/Firefox browsers are all so popular, and all render pages very differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants