Question

How to enable pinch zoom on website for mobile devices?

Pinch zoom is a key feature of mobile browsing, which allow you to to zoom in to read content and out to locate content within a page. I am trying to enable this feature on my website. I’ve tried to enable zooming by setting meta viewport like this.

<meta name=“viewport” content=“width=device-width,initial-scale=1”>

It’s working on my android smartphone(Sony) but it’s not zoomable on iPad and iPhone. My site www.pnrstatusbuzz.in is a php site, design in HTML5. Is this a designing issue or error in above mentioned code.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks for the response, i will replace my code with yours and let you know the effect.

The viewport meta tag has some other parameters that when added may solve the issue with zooming on iOS. Here’s an example:

<meta name="viewport" content="width=device-width, initial-scale=.5, maximum-scale=12.0, minimum-scale=.25, user-scalable=yes"/>

user-scalable looks to be the main parameter you’re missing that should make the difference.