How to optimize website for touch devices

It sounds to me like you want to have a touch-screen-friendly option, to cover the following scenarios:

  1. iPhone-like devices: small screen, touch only
  2. Small screens, no touch (you didn’t mention this one)
  3. Large screens, no touch (i.e. conventional computers)
  4. Touch-screen-enabled large screens such as iPad, notebooks/pcs with touch screens.

For case 1 and 2 you will probably need a separate site or a CSS file that eliminates lots of unnecessary content and makes things larger and easier to read/navigate. If you care about case #2 then as long as the links/buttons on the page are keyboard-navigable then case 1 and 2 are equivalent.

For case 3 you have your normal website. For case 4 it sounds like you want clickable things to be bigger or easier to touch. If it’s not possible to simply make everything bigger for all users, an alternate style-sheet can provide you with the touch-friendly layout changes.

The easiest thing to do is provide a link to the touch-screen-version of the site somewhere on the page. For well-known touch devices such as iPad you can sniff the user agent and set the touch stylesheet as the default. However I’d consider making this the default for everyone; if your design looks good on the iPad it should look acceptably good on any notebook. Your mouse users with less-than-stellar clicking skills will be pleased to find bigger click targets, especially if you add appropriate :hover or mouseover effects to let users know that things are clickable.

I know you said you don’t want to sniff user-agents. But I’d contend that at this time the state of browser support for this is in too much flux to worry about the “Correct” way to do it. Browsers will eventually provide the information that you need, but you will probably find that it will be years before this information is ubiquitous.

Leave a Comment