Detecting Mobile Browsers, What do you do?

7 replies
Hey Everyone,

Just looking up some info on checking for Mobile Browsers to load a Mobile version of a site.

I know you can do it with user_agent, but is there alternatives?

thoughts?

Thanks,
#browsers #detecting #mobile
  • Profile picture of the author ninal
    You can also control the site's appearance via stylesheet.

    Example would be using a separate stylesheet for iphones.
    Signature
    Hello
    {{ DiscussionBoard.errors[2068879].message }}
    • Profile picture of the author CarloD.
      Yes,

      The question is:

      How can I detect if they are on a mobile browser or not....

      If they are THEN load mobile.css...

      I am also looking for detection of all mobile browsers not just the browser on an iPhone.
      Signature

      {{ DiscussionBoard.errors[2069028].message }}
      • Profile picture of the author Steve Wells
        Originally Posted by CarloD. View Post

        Yes,

        The question is:

        How can I detect if they are on a mobile browser or not....

        If they are THEN load mobile.css...

        I am also looking for detection of all mobile browsers not just the browser on an iPhone.
        Sent you a P.M.
        Signature
        Need Custom Graphics Work? - Message Me For A Design Quote!
        {{ DiscussionBoard.errors[2069341].message }}
        • Profile picture of the author jminkler
          wordpress has plugins for this .. otherwise use the user_agent string from the request.
          {{ DiscussionBoard.errors[2070637].message }}
  • Profile picture of the author ninal
    There are various scripts that can do this for you, I haven't tried them out though.

    Here's a free version and a paid version (free for non-commercial sites).
    Signature
    Hello
    {{ DiscussionBoard.errors[2069123].message }}
  • Profile picture of the author oca101
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[2070924].message }}
    • Profile picture of the author ijohnson
      Unfortunately, MobiSiteGalore is no longer free. They now have a 15-day trial period and 3 different service packs to choose from that range from $8, $12 and $17 per month.

      WordPress offers a free WP Mobile plugin that gives you more customizable features.
      Signature
      Make every day count!
      {{ DiscussionBoard.errors[2074236].message }}
  • Profile picture of the author ryanstreet
    wptouch works for a wordpress site.

    Other sites, you can use CSS conditional styling:

    Mobile Browser
    HTML Code:
    <link media="only screen and (max-device-width: 480px)" href="small-device.css" type= "text/css" rel="stylesheet">
    Standard Browser
    HTML Code:
    <link media="screen and (min-device-width: 481px)" href="not-small-device.css" type="text/css" rel="stylesheet">

    The full Safari Tutorial is here for you to digest if interested:

    Safari Web Content Guide: Optimizing Web Content

    Here is the Wp Touch site. Free To download:

    WPtouch: Mobile Plugin + Theme for WordPress » BraveNewCode Inc.

    Hope this helps.

    Later.
    Signature
    Ryan Street
    PHP Developer Specializing in WordPress and Magento
    {{ DiscussionBoard.errors[2074251].message }}

Trending Topics