1. Download our Official Android App: Forums for Android!

Apps How do some web sites disable the browser zoom?

Discussion in 'Android Development' started by Ty Webb, Jan 14, 2010.

  1. Ty Webb

    Ty Webb Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jan 14, 2010

    Jan 14, 2010
    1
    0
    5
    Go to m.cnn.com and the browser zoom seems to be disabled. Same with google's mobile site.

    Go to yahoo's[​IMG] mobile site and the zoom is back.

    Anyone know how this is done?
     

    Advertisement

  2. KeithG

    KeithG Well-Known Member
    Rank:
    None
    Points:
    46
    Posts:
    103
    Joined:
    Nov 15, 2009

    Nov 15, 2009
    103
    3
    46
    On my droid, the yahoo site does not provide zoom widgets.

    I would surmize ...

    Code (Text):
    1.  
    2. if virutalPageWidth > screenWidth:
    3.     enable page zooming
    4. else:
    5.     disable page zooming
    6.  
    Which, would allow any site to avoid zooming as long as it fits the devices screen width without a horizontal scroll bar. It would also explain the abberation of m.yahoo.com having zoom widgets on your device whereas mine does not.
     

Share This Page

Loading...