I am developing a mobile web-application.I am using jsp,ajax,java classes.I want to stop the page zooming on browser.How it will possible?...I was used meta tag for it but it did n
This should work fine for iOS:
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
On android, it doesn't work for certain devices though such as HTC.
Related
I am trying to disable user pinch zoom on a web page dedicated for mobile devices, i tried the following meta tags with no avail:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
I also tired this:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
some of my older websites that used to succeed in disabling user pinch zooming before, no longer work anymore as of today.
I am not sure if there's any new standards for achieving the same effect, but i dont seem to find any newer solution on the internet that would work with iOS 13.3.
My scenario is I have iphone 5S device and safari browser. In this browser I opened a site (this site is included in bootstrap responsive also) with include below meta tag code.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0">
If I opened the site with zoom in mode. everything is fine.
My problem is if open any other page of the same site it is showing zoom in view, but my requirement is if I open any page it will show normal view not in a zoom view. How can I do?
Shall I add any code in the meta tag? please suggest me
Use this
<meta id="id" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
$(document).ready(function(){
$("#id").attr("content", "width=device-width, initial-scale=1")
})
I was looking to disable zoom on the puffin web browser on an iPad, and I came across this meta tag:
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
This tag disables zooming on safari on the iPad, but not on puffin. Is there something else I need to add to disable zooming on puffin?
<meta name="viewport" content="user-scalable=no,
initial-scale=0.5, width=610, height=1024" />
The mobile is small,so I wan't to scale html5 to 0.5.It takes no effect via phonegap,but it's OK via chrome on iphone 5.
Is it phonegap's bug?
--------------Edit----------------
I found that if I move off the code I showed above,the chrome will still do well on scaling.The pictures are showed smaller than desktop views.It's scaled by default.
But phonegap doesn't.
How to make phonegap scale my html5?
Try this
<meta name="viewport" content="user-scalable=no, initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, width=device-width, height=device-height, target-densitydpi=device-dpi" />
Specifically, would including <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> in the header of a page that is served to both mobile and desktop browsers affect the layout when viewed in a desktop browser?
No. It will cause no problems with desktop browsers.