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

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!

Leave a Reply

Your email address will not be published. Required fields are marked *