Disable Zoom Function of Android Browser, force native resolution

web based control interfaces, mobile device web development

The Task#

Sometimes you need the native resolution of your tablet pc/smartphone for e.g. web based control, games or user interfaces and you wanna disable the multitouch zoom function. It’s quite easy, just add the following meta tag into your HTML document:

It should work on all Android Devices and also on Apple iOS.
Tested on ThinkpadTablet.

The Solution#

Just add a simple meta tag into the <head> section of your html document:

<!-- set viewport to native resolution (android) - disable zoom !-->
<meta name="viewport" content="target-densitydpi=device-dpi; width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

References#

Android Developer Guide