Re: Headers on smart phone browsers
| From: | Adam Richardson | Date: | Mon, 06 Feb 2012 20:50:59 +0000 |
| Subject: | Re: Headers on smart phone browsers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316494@lists.php.net to get a copy of this message | ||
On Mon, Feb 6, 2012 at 12:58 AM, Paul M Foster <paulf@quillandmouse.com>wrote:
> This is sort of obliquely related to PHP.
>
> I don't have a smart phone, but I need to know a couple of things:
>
> 1) Do smart phones use the same browsers as the desktop, or do they have
> their own stripped down versions of browsers?
>
Both, although more and more smart phones join the ranks of the
desktop-quality browser every day (iPhone and Android both have very
capable browsers, with the iPhone's omission of flash support being the
biggest difference between these two.)
>
> 2) When a browser broadcasts its header telling the server what kind of
> browser is involved, do they broadcast anything in the header to
> indicate that they're being run on a smart phone?
>
Yes, but that gets complicated quickly:
http://www.zytrax.com/tech/web/mobile_ids.html
>
> 3) Bonus question: Is there a preferred method amongst coders to
> determine what type of environment is being browsed from, so as to serve
> up the proper type of page (desktop or smart phone version of a
> webpage)?
>
To supplement the alistapart link already mentioned, here's another recent
writeup:
http://dev.opera.com/articles/view/how-to-serve-the-right-content-to-mobile/
I develop mobile games and websites, and I never use the User Agent to
alter site/presentation. Media queries and types are the way I handle this
(sometimes creating separate mobile resources, but most of the time
creating designs that adapt accordingly.)
All this to say, I don't use PHP to handle this aspect of the development.
Adam
--
Nephtali: A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com