SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Detecting Device -- must be an easier way

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    217
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Detecting Device -- must be an easier way

    What do you use to detect mobile device attributes?

    Starting with this forum's stickies, I eventually ended up buying "Programming the Mobile Web" by Maximiliano Firtman. His chapter on detecting the device and mobile screen attributes (CHAPTER 10 Server-Side Browser Detection and Content Delivery) is , um-m-m, daunting to say the least.

    "All" I want to do is determine if the device is mobile, the screen width and assure that the font size is readable. Firtman gets into Ajax and WURFL and/or DeviceAtlas as his recommendations for device / format detection.

    Is it really that hard?

    Regards,

    grNadpa

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    15,823
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    It is not really as easy as that - even with all that in place it still will not be completely accurate.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    It's all Geek to me silver trophybronze trophy
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    20,006
    Mentioned
    217 Post(s)
    Tagged
    3 Thread(s)
    Device detection with scripts is a messy area, and many feel it's better avoided. A much easier, perhaps more 'organic' approach, is gaining interest. This slideshow explains:

    Rethinking the Mobile Web by Yiibu

    Basically, you style your pages such that they will be easy to read on all devices with your main style sheet. It's really a very simple, plain style sheet.

    Then, for devices that can handle @media queries (part of CSS3) you provide nicer styles. This works for devices like iPhone and most desktop browsers.

  4. #4
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    217
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    felgall sez:
    It is not really as easy as that - even with all that in place it still will not be completely accurate.
    ralph.m: I have read "Rethinking the Web" which is what got me to thinking about starting with mobile rather than desktop.

    What's in the back of my mind, as an involuntarily retired mainframer, is to help those businesses with simple web sites gain a web presence. I'm simply exploring the idea right now -- but what I aim for is something a little bit more technical than the businessperson/hobbiest can do by themselves but not so sophisticated as having to rewrite their entire site -- i.e. pull the formatting out of the conent, but handle format through selecting the proper CSS through PHP.

  5. #5
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    217
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    make
    help those businesses with simple web sites gain a web presence
    read
    help those businesses with simple web sites gain a mobile web presence

  6. #6
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    217
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Going through this forums postings, I indirectly found this site.

    Particletree » Dynamic Resolution Dependent Layouts

    I understand that ie/8 and before is problematic, but is there any other major malfunction?

    (grNadpa) Brian Case

  7. #7
    It's all Geek to me silver trophybronze trophy
    SitePoint Award Recipient ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, Australia
    Posts
    20,006
    Mentioned
    217 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Grnadpa View Post
    I understand that ie/8 and before is problematic, but is there any other major malfunction?
    Why do you think there are problems with IE8 etc? Seems OK to me, although things move quickly on the web, and I feel things have moved on quite a bit since that article was written. Still, seems to be usable.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •