Determine from a HTTP request if the user is on a Smart Phone, IE, Firefox

Chris Rebert clp2 at rebertia.com
Mon Jan 31 18:34:30 EST 2011


On Mon, Jan 31, 2011 at 2:16 PM, Sascha <samzielkeryner at gmail.com> wrote:
> Hello
>
> 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?

Yes, the "User-Agent" HTTP header:
http://en.wikipedia.org/wiki/User_agent

Cheers,
Chris



More information about the Python-list mailing list