Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To "user-scalable=no" or not to "user-scalable=no"

I've read different threads but never got to a clear conclusion, what are the differences, advantages and disadvantages of using user-scalable=no on case A or case B?

I'm going to do a responsive website, which case is better then?

CASE A:

<meta name="viewport" content="width=device-width, user-scalable=no">

CASE B:

<meta name="viewport" content="width=device-width"> 
like image 788
Daniel Ramirez-Escudero Avatar asked Mar 12 '14 14:03

Daniel Ramirez-Escudero


People also ask

What does user-scalable No mean?

About the user-scalable attribute The attribute is set as user-scalable="yes" by default, which means that people are able to control the zoom setting for the page they're visiting. Changing it to user-scalable="no" would prevent zoom settings from working on both mobile and desktop devices.

What is user-scalable?

The user-scalable attribute defines whether users can scale (zoom) the page content on mobile. By default, scaling is on, but if user-scalable is set to '0' or 'no' then this will prevent users from zooming, which negatively affects user experience (in most cases).

What is Shrink to fit in HTML?

Shrink to Fit - Sheet Size maximizes the usage of the paper size during calculation of the scaling factor. However, because of the layout of the content in the original document, the scaling may not produce the desired result. Clipping of the content may occur.

How do I turn off zoom in HTML?

Giving a meta tag attribute "user-scalable=no" will restrict the user from zooming elsewhere. Prevent zooming all together by adding this meta tag to your head tag. This tells the mobile browser to use the same width scale and will not allow the user to zoom in at all, hence also disables that annoying behavior.


1 Answers

You don't need to use user-scalable=no for responsive web design. You use it if you want your web app to feel more like a native app (in terms of zooming). You can control that users wont break your design if they zoom in. But technically, if you're doing responsive and your design breaks when zooming in, then you're not doing it right.

But, if you absolutely need to use it: "... however keep in mind that zooming is an important accessibility feature that is used by a lot of people. Turning it off should therefore only happen when really necessary, such as for certain types of games and applications." http://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/

like image 159
AbeyMarquez Avatar answered Sep 21 '22 17:09

AbeyMarquez