Determine from a HTTP request if the user is on a Smart Phone, IE, Firefox
vivshrivastava at gmail.com
Tue Feb 1 01:51:18 CET 2011
> its userAgent or UserAgent String. Though its easy to send request with
> any( fake) userAgent but its industry standard to get browser information
> from userAgent only.
> On Mon, Jan 31, 2011 at 2:46 PM, James Mills <prologic at shortcircuit.net.au
> > wrote:
>> On Tue, Feb 1, 2011 at 8:16 AM, Sascha <samzielkeryner at gmail.com> wrote:
>> > I am returning specialised website html according to what platform the
>> > user is on. Is there a way to determine if the user is on a Smart
>> > Phone or on IE or on Firefox?
>> I have an iPad and just wrote a simple demo app to test this:
>> Source: http://codepad.org/zdZJgm1j
>> Basically if you check for the string "iPad" in
>> the User-Agent header. Obviously this only
>> works for iPads running IOS and the built-in
>> Safari Web Browser - but I'm sure other tablet/mobile
>> devices provide similar unique User-Agent strings.
>> -- James Mills
>> -- "Problems are solved by method"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list