Why the server know the request is from android phone?
i have a question about how the web server know the http request is from an android phone but not pc browser. anyone know? for example, if we browse some particular website, the server will return a mobile format of website to our android phone. I would like to know that how this thing happen. if ok, please explain it in a programming view.
Thanks. Good days all!
09-25-2011 05:43 AM
User Agent String
From a web developers perspective, if I wanted to create different pages for people viewing with browsers (IE, Mozilla, Safari) in order to ensure I'm providing a website that abides by their web standards (yes they're different), I can use the User Agent String passed from the browser to the server to determine browsing engine and operating system.
Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405