On 12/12/2011 17:52, Jerry Malcolm wrote: > What is the best/recommended way to determine if the request is coming from > a mobile device? I have an alternate layout that I want to use for pages > going to a smart phone, etc. I know there is client/browser info in the > request. But it's more browser-specific info. Is there one specific > string or something that I can look for that will catch all smart phones, > etc?
Have a look at: request.getHeader("User-agent")
You'll find that user agent strings are widely varied. This isn't a
problem unique to mobile devices...
> Recommendations?
There's a few techniques, but they're all compromises & somewhat out of
scope for this mailing list...
p
--
[key:62590808]
signature.asc
Description: OpenPGP digital signature
