8

Why desktop-chrome ignores this:

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">

I can resize chrome content with windows-touch and also ctrl+mouse-wheel. I want to prevent zooming.


Chrome: Version 65.0.3325.146 (Official Build) (32-bit)

1 Answers1

3

According to the Google Map documentation,

Android and iOS devices respect the following <meta> tag:

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

This setting specifies that the map should be displayed full-screen and should not be resizable by the user. Note that the iPhone's Safari browser requires this tag be included within the page's element.

Desktop computers do not respect the user-scalable attribute, though mobiles will.

If you want to prevent zoom in Chrome on desktop computers, your best bet would be to enable kiosk mode with the following startup arguments:

chrome.exe --kiosk --incognito --disable-pinch --overscroll-history-navigation=0
Community
  • 1
  • 1
Obsidian Age
  • 41,205
  • 10
  • 48
  • 71
  • 2
    Ok, so i cannot use the meta-tag to force it in desktop; but also i cannot tell the user to use a complex Command. –  Mar 19 '18 at 20:09
  • 1
    Ok, infact your answer helped me a lot about another question i had in my mind, Thanks :) i add some parameters to your answer and changed it like this **"C:\Program Files\Google\Chrome\Application\chrome.exe" --app=http://www.stackoverflow.com --windows-size=800,600 --kiosk --incognito --disable-pinch --overscroll-history-navigation=0** the incognito mode working but zooming still enable ! –  Mar 19 '18 at 20:27
  • Hello Obsidian!, I am trying to execute chrome as you said, with the --disable-pinch --overscroll-history-navigation=0 flags in command line but it does not work at all. I am using Chrome Versión 73.0.3683.75. It does not forbid the overscroll gestures.... I am about to go crazy....:|. Any help is sooo welcome. Thanks! – ÁngelBlanco Mar 13 '19 at 13:19