Tommy D
Tommy D

Reputation: 418

Disabling zoom meta tag

What's the comlete version of the zoom disabling viewport meta tag?

I have tried with: <meta name="viewport" content="width=device-width, initial-scale=1">

but it just sets the appropriate scale and doesn't prevent zooming.

I also tried with: <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,target-densitydpi=device-dpi, user-scalable=no" />

But it just doesn't work, I can still pinch zoom on my mobile.

Upvotes: 4

Views: 26791

Answers (2)

Tommy D
Tommy D

Reputation: 418

It finally worked using that this way:

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

Upvotes: 19

Amar Syla
Amar Syla

Reputation: 3653

You can use this:

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,target-densitydpi=device-dpi, user-scalable=no" />

Upvotes: 1

Related Questions