Why the server know the request is from android phone?

This is a discussion on Why the server know the request is from android phone? within the Beginning Developers forums, part of the Android Development category; hi guys, i have a question about how the web server know the http request is from an android phone but not pc browser. anyone ...

Results 1 to 2 of 2

Thread: Why the server know the request is from android phone?

  1. #1
    Android Lurker firefly3's Avatar
    Join Date
    Sep 2011
    Posts
    1

    Why the server know the request is from android phone?

    hi guys,

    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!

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Android Lurker dreded's Avatar
    Join Date
    Oct 2011
    Posts
    3
    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

    User Agent Sniffing is the practice of gaining this information to display information based on end user device/browsers. Some methods are as simple as using META tags in your header to render WML to mobile browsers, while other methods use JavaScript and other languages to determine this information.

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Hub server
    By Jessica in forum General HTC Discussions
    Replies: 2
    Last Post: 05-28-2011, 07:31 PM
  2. DXF server currently down!
    By wicked in forum Motorola Droid X
    Replies: 9
    Last Post: 04-14-2011, 11:42 AM
  3. Replies: 1
    Last Post: 03-17-2011, 01:34 PM
  4. Request: Live Wallpaper Tutorial?
    By htc(hot-taco-cheese) in forum Beginning Developers
    Replies: 4
    Last Post: 02-05-2011, 06:39 PM

Search tags for this page

android request server
,
android server request
,
android view http requests
,
android+server request
,
firefly3 android why the server know the request is from android phone
,

firefly3 android.net

,
how to display http request from android on web server
,
how web server know phone browser
,
http request from phone to server#q
,
thread server android
Click on a term to search our sites for related topics.
Android Forum