Why attempt to identify mobile users? why not let them decide if they want the stripped down mobile site, or the full fat desktop site. I think it would be better if you setup an alternative URL for users who want the stripped down site such as: http://m.<yoursite>.com

That way users who are using fancy smartphones and tablets with large screens and fast data connections can choose to use the desktop site if they want to, while users on underpowered desktop computers on the end of slow dial up connections can use the mobile site to save on bandwith and site complexity.

Having said that, if you realy need to identify mobile browsers, then take a look at WURFL. It is a database of thousands of mobile browser user agent strings, with the properties of each device so you can taylor a site for screen size, JavaScript support etc.

There is a perl module Mobile::Wurfl to interface to WURFL though when I tried using it I found it did not have enough features. The author did not accept a patch I sent, so I ended up writing my own WURFL libary which my employer will not allow me to share.


In reply to Re: Grabbing query string by chrestomanci
in thread Grabbing query string by htmanning

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.