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

Relationship between tablet() and mobile() is confusing #90

Closed
oschwald opened this issue Sep 8, 2014 · 6 comments
Closed

Relationship between tablet() and mobile() is confusing #90

oschwald opened this issue Sep 8, 2014 · 6 comments

Comments

@oschwald
Copy link
Contributor

oschwald commented Sep 8, 2014

Currently, the test for mobile appears to explicitly include some tablets, but it does not include everything in tablet(). The documentations for mobile() says, "Returns true if the browser appears to belong to a handheld device." From this, it is not clear if tablet() is supposed to be a subset of mobile() or if they two are supposed to be (mostly) mutually exclusive.

@oschwald
Copy link
Contributor Author

oschwald commented Sep 8, 2014

This is related to #38.

@oalders
Copy link
Owner

oalders commented Sep 8, 2014

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.

@oalders
Copy link
Owner

oalders commented Oct 22, 2014

@dougwilson thoughts?

@dougwilson
Copy link
Collaborator

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.

@andrewmoise
Copy link
Collaborator

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"?

@andrewmoise
Copy link
Collaborator

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.

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

4 participants