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

It is to check the size and screen orientation? #40

Closed
quinhone opened this issue Nov 5, 2015 · 1 comment
Closed

It is to check the size and screen orientation? #40

quinhone opened this issue Nov 5, 2015 · 1 comment

Comments

@quinhone
Copy link

quinhone commented Nov 5, 2015

example:
if (BrowserDetect::isMobile() and BrowserDetect::isMobile('display-width')> 500px) {
...
}
or
if (BrowserDetect::isTablet() and BrowserDetect::isTablet('horizontal')) {
...
}

@hisorange
Copy link
Owner

It's not possible to detect screen orientation on server side without a client side script.

If you wana detect screen orientation write a simple javascript which takes the document.windowWidth and document.windowHeight attributes and push it into a cookie this way you can pass the info on request to the server.

But you still can't detect a rotation by pure server side everything what happens after the php buffer is pushed is only client side.

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