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

S

Sascha

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?

Using python &/or examining HTTP packets?
 
J

James Mills

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:

http://prologic.no-ip.org:8000/

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.

cheers
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,440
Latest member
YoungBorel

Latest Threads

Top