-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Relationship between tablet() and mobile() is confusing #90
Comments
This is related to #38. |
I think that tablet() should be a subset of mobile() except in the case of Android. Do we also want to add other devices to mobile such as PlayStation Portable? Those devices are certainly mobile. |
@dougwilson thoughts? |
Right. It really comes down to do we think "mobile" means you can move the device (so would laptops count?) or if it connects to a cellular network. I think it's currently the later case, which is probably why they are not a strict superset. |
I think the crux of the matter is discussed in the article attached to #38: http://googlewebmastercentral.blogspot.co.uk/2011/03/mo-better-to-also-detect-mobile-user.html "tablet users usually prefer the full desktop version over the mobile equivalent. If your site matches 'android' and then automatically redirects users, you may be forcing Android tablet users into a sub-optimal experience." FWIW, my preferred working definition of the "mobile" test would be, "is this a device where the mobile version of a web site is appropriate to present instead of the desktop version"? |
I believe this has been resolved; as of v3.0 "tablet" and "mobile" are mutually exclusive. Tablets have tablet() true and mobile() false, and only devices that probably want the mobile version of your web site (phones, handheld game systems, etc.) have mobile() true. |
Currently, the test for mobile appears to explicitly include some tablets, but it does not include everything in
tablet()
. The documentations formobile()
says, "Returns true if the browser appears to belong to a handheld device." From this, it is not clear iftablet()
is supposed to be a subset ofmobile()
or if they two are supposed to be (mostly) mutually exclusive.The text was updated successfully, but these errors were encountered: