Webs for Mobiles

Discussion in 'HTML' started by JohnW-Mpls, Mar 21, 2013.

  1. JohnW-Mpls

    JohnW-Mpls Guest

    What coding distinguishes devices accessing a web site?

    One site I visit treats access by a mobile device like droid or ipad
    differently than access by a regular note/desk computer. That is good -
    the screen size for each is vastly different and the presentations may well
    be different but both from the same websites pages.

    I can guess at the programming out from index.html but I have no clue as to
    how index.html would know the accessing device type.

    Anyone know? Or are my assumptions wrong - it's different?

    --
    JohnWFA
    JohnW-Mpls, Mar 21, 2013
    #1
    1. Advertising

  2. JohnW-Mpls

    Idle Guest

    On Thu, 21 Mar 2013 10:10:55 -0500, JohnW-Mpls wrote:

    > What coding distinguishes devices accessing a web site?
    >
    > One site I visit treats access by a mobile device like droid or ipad
    > differently than access by a regular note/desk computer. That is good -
    > the screen size for each is vastly different and the presentations may well
    > be different but both from the same websites pages.
    >
    > I can guess at the programming out from index.html but I have no clue as to
    > how index.html would know the accessing device type.
    >
    > Anyone know? Or are my assumptions wrong - it's different?


    Depends.
    They could be detecting the device accessing the site and serving up a
    mobile version, or the main site could be a responsive designed site
    which auto responds to the size of the viewport.

    --
    idle
    http://cooldotz.com
    Idle, Mar 21, 2013
    #2
    1. Advertising

  3. På Thu, 21 Mar 2013 16:10:55 +0100, skrev JohnW-Mpls <>:

    >
    > What coding distinguishes devices accessing a web site?
    >
    > One site I visit treats access by a mobile device like droid or ipad
    > differently than access by a regular note/desk computer. That is good -
    > the screen size for each is vastly different and the presentations may
    > well
    > be different but both from the same websites pages.
    >
    > I can guess at the programming out from index.html but I have no clue as
    > to
    > how index.html would know the accessing device type.
    >
    > Anyone know? Or are my assumptions wrong - it's different?


    The index.html file itself wouldn't know the difference, although a
    server-side script might analyze the user agent string sent by the browser
    and present different types of content.

    However, the best approach would be to create a responsive design that
    would fit any screen type, whether it's a desktop browser, a smartphone
    (or web-capable mobile phone), or a tablet. A responsive design would also
    fit perfectly using both landscape and portrait display modes on mobile
    devices.
    http://en.wikipedia.org/wiki/Responsive_web_design

    As an alternative, you can create a separate stylesheet just for mobile
    devices, and serve it by specifying the stylesheet "media" type.
    http://www.w3.org/TR/CSS2/media.html

    --
    Kim André Akerø
    -
    (remove NOSPAM to contact me directly)
    Kim André Akerø, Mar 21, 2013
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Erik Cruz

    Creating sub webs

    Erik Cruz, Mar 3, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    428
    Erik Cruz
    Mar 3, 2005
  2. Keith
    Replies:
    4
    Views:
    488
    Keith
    Jan 22, 2004
  3. Lloyd Sheen

    Main Page to navigate to webs

    Lloyd Sheen, Jan 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    Lloyd Sheen
    Jan 22, 2004
  4. Martin Zachs
    Replies:
    1
    Views:
    327
    John Saunders
    Jul 1, 2004
  5. =?Utf-8?B?Q2hyaXM=?=
    Replies:
    1
    Views:
    317
    Karl Seguin
    Jan 7, 2005
Loading...

Share This Page