Search code examples
optimizationweb-applicationswebmobilemobile-website

Optimizing website for mobile devices


I am developing a website exclusively for mobile browsers. What guidelines should I follow to optimize the site for mobile development? My main concerns:

  1. Most mobile devices have propriety browsers. How can the app be tested on those different browsers (testing on an actual device is not possible due to security restrictions)?

  2. How to optimize the site for different screen sizes?

  3. How to make the app touch friendly?

  4. How to detect orientation of devices (in devices that come with an accelerometer)?

  5. How to check that the device is not a desktop/laptop?


Solution

  • Things that I have used when designing mobile websites.

    1. Find out the range of devices that you are planning to support. Some questions that you can ask are
      • Are u going to support only smartphones
      • What platforms are u planning to support ( iPhone, Android, Symbian ? )

    A lot of you questions can be answered by the kind of Analytics that you are able to gather. If you have very less statistics then you can follow this strategy to start with.

    1. Separate out the target range of devices into

      • simple ( basic phones with minimum browsing capabilities. ) - Design a very simple plain vanilla site for them.
      • medium ( older generation smartphones with browsers with poor javascript support ) - Design a site that has slightly better features.
      • Highend smartphones ( iPhone, Android, WebOS ) - Provide jazzy features that these phones support.
    2. Use a device detection library like WURFL / .Mobi for device detection and WALL for dynamic rendering of content.

    3. You can use .Mobi to detect an HTML5 compliant mobile browser. That way, you can take advantage of HTML5 capabilities in the devices that support it.

    4. For testing you can follow this approach

      • test on browsers - Firefox / Safari / Opera have plugins to alter USER_AGENT and can simulate mobile testing.
      • Test on simulators - All the device platforms provide free to download emulators
      • If needed try device emulation products like device anywhere / perfecto.

    I hope I was able to clarify atleast some of you questions. :)