0

How do i determine whether the page is opened using a tablet or a mobile phone, i get that you can check for iPhone, iPad, etc. but is there a more distinct identifier in determining whether the page was opened using mobile, or tablet?

I'm using this so i can get the width of the page, but if there is a more efficient way of getting the current width of the page, do let me know

thank you :)

4
  • 1
    stackoverflow.com/questions/6636306/mobile-browser-detection stackoverflow.com/questions/3817155/… Commented Dec 17, 2012 at 18:22
  • 1
    and if they're coming in using a google Nexus 10, which has a resolution of 2560x1600? That's far higher than my desktop monitors, yet one's mobile and one's not... Commented Dec 17, 2012 at 18:28
  • @MarcB true, how will you go around it then? Commented Dec 17, 2012 at 18:47
  • 1
    "mobile" is getting to be a pointless definition, since your average "about a year old" smartphone has screens with higher resolution than your average cheapie "good enough for grandma" desktop machine. mobile v.s. "full" made sense when mobile meant a dinky 150x300 screen viewing via WAP. Commented Dec 17, 2012 at 19:06

1 Answer 1

1

See http://php.net/manual/en/function.get-browser.php You may need some JavaScript to get the dimensions of the viewport.

Sign up to request clarification or add additional context in comments.

2 Comments

what kind of javascript function would i need to know for this?
See java-samples.com/showtutorial.php?tutorialid=1015 And there may be something good in jQuery.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.