Daily Archives: November 27, 2015

Prevent scrolling and zooming on touch within the browsers in mobile devices

Published by:

If you want that a user should not be able to scroll or zoom via touch in the web browser of a mobile device, use this code in the HTML:

<!–Prevents iPhone, iPad, and touch devices from scrolling or zooming when touched–>
<meta name=”viewport” content=”width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0″ />
Enjoy the tip!

Note: Most useful: when you are building and interactive HTML5 Canvas!