mobile-website

Difference between visual viewport and layout viewport?

ぃ、小莉子 提交于 2019-11-28 15:12:54
What is the Difference between visual viewport and layout viewport for a mobile device like iPhone/iPad? I have gone through a lot of online resources, but am still unclear about it. The visual viewport is the part of the page that’s currently shown on-screen. The layout viewport can be considerably wider than the visual viewport, and contains elements that appear and do not appear on the screen. Imagine the layout viewport as being a large image which does not change size or shape. Now imagine you have a smaller frame through which you look at the large image. The small frame is surrounded by

Tips for optimizing a website for Android's browser? [closed]

拥有回忆 提交于 2019-11-28 15:06:06
I'm looking for tips, tricks and resources on optimizing a website design for Android's browser. I'm building an Android app and some of the functionality will be accessible through a web interface. Daniel I rely on two elements to optimize websites for mobile browsers (especially Android and iPhone): Meta tags: HandheldFriendly and viewport Usually I want pages not to have a page width of 800 to 900 pixels, as the Android and iPhone browsers set it to by default. To have the page width the same as the device width, I set the following meta tags: <meta name="HandheldFriendly" content="true" />

Mobile or desktop browser detection and redirect to respective web page

久未见 提交于 2019-11-28 10:31:54
I m building a website in PHP which contains flash in it's index page. I want to redirect users who are accessing my site via any mobile browser or ipad,ipod,iphone to page m.index.php which doesn't contain flash(simple page) for loading purpose and for others who access via desktop browser to index.php which contains flash in it. How do I achieve it. Please help me. Thanks in advance.... Jacob You could use .htaccess like in this answer or in this answer or you could check the user-agent in php: <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/android|avantgo|blackberry|blazer

How to fetch device information from a progressive web app

大兔子大兔子 提交于 2019-11-28 10:26:09
How to fetch device information (Google Advertising Id or IDFA) from a progressive web app https://developers.google.com/web/progressive-web-apps/ Google Advertising ID is not accessible to progressive web app running in browser and so the installed PWA. Said that, you can make it available to your installed PWA using an Android service(which is a native code getting the Google Advertising ID) and passing it to your PWA using Deep link s, by setting a Indent filter to your PWA with a URL and have the ID retrieved in your native code passed to web app in the query para (URL). You can refer to

Mobile HTML rendering numbers

房东的猫 提交于 2019-11-28 10:13:49
I have a mobile WEB Page showing a bank statement. Something like this: DATE | DESCRIPTION | AMOUNT --------------|--------------------------|--------------- Jan 2nd 2010 | Clothes | USD 1.839.000 Sep 23rd 2010 | Drinks | USD 2.837.000 I am using . as a thousand separator since that's our locale configuration for that. HTML is very simple. Something like this: <table> <tr> <td>DATE</td> <td>Clothes</td> <td>AMOUNT</td> </tr> <tr> <td>Jan 2nd 2010</td> <td>Clothes</td> <td>USD 1.839.000</td> </tr> <tr> <td>Sep 23rd 2010</td> <td>Drinks</td> <td>USD 2.837.000</td> </tr> </table> The problem I am

Android Browser textarea scrolls all over the place, is unusable

走远了吗. 提交于 2019-11-28 09:10:39
So I've built a nice, shiny HTML5 application that is targeted at mobile Safari, and Android's default browser. The Android versions I'm testing it on are 2.1 and 2.2. My app has a textarea on one of its pages, and this textarea tends to have a good amount of text in it at times. Its basically a free-form writing field. This works as expected in iOS. However on Android, as you type, the screen scrolls wildly up and down on every keystroke, often you can't see what it is you're typing as you type, and you get dizzy from all the jumping around. Furthermore, if the content within the textarea

jquery mobile How to stop auto scroll to focused input in Mobile web browser

左心房为你撑大大i 提交于 2019-11-28 08:36:31
问题 In mobile device, when I open my page, and select an inputbox, the virtual keyboard is open, and page got scrolled automatically to put inputbox at center. I do not want this action. I have googled many answers, most of them suggested to manually call following javascript code in resize event. window.scrollTo(0,0) But when I tried, it makes the page twitched, like page scrolled down, and then got back shortly. Any good solution? Thanks. 回答1: Okay. So now you know how to detect virtual

Using client side XSLT transformations in the HTML5 era

旧时模样 提交于 2019-11-28 08:13:52
问题 Can anyone help regarding the availability of client-side XSLT in mobile HTML5 browsers? caniuse.com has nothing on it. Is XSLT actually standardized across current mobile browsers? The HTML5 spec has nothing on XSLT which puts into question whether XML has a future (in light of the fact that there is JSONP but there is no "XMLP") 回答1: The XSLTProcessor API is part of the HTML5 scripting spec: Interaction of script elements and XSLT When an XSLT transformation program is triggered by an

Detecting mobile browser in GWT [closed]

耗尽温柔 提交于 2019-11-28 06:34:08
I want to implement a web application with separate user interface for mobile and PC. Do you know how can I detect whether it is mobile or not? In general, do you have any suggestion for implementing such application in GWT? Nico Adams On the client side, you can use the Navigator class to get the platform and the user agent string: Navigator.getPlatform Navigator.getUserAgent Identify devices and platforms that way. If you are used to developing with the MVP pattern or want to make a mobile version of an existing app, I would suggest to use m-gwt . M-gwt works well with GWT best practices,

Is it okay to use <input type=“tel”/> now?

你。 提交于 2019-11-28 04:47:59
I'm working on a mobile phone web app and I have several text fields that could benefit from <input type="tel"/> . iPhones will adjust the keyboard for the user, but I'm worried about breaking backwards compatibility. What I'm hoping is that browsers/phone that support this can assist the user and other browser will fall back to a standard text field? Is this an acceptable practice? Does it even work? Yes, any unsupported type will revert to the 'type=text' format. I found a good page which lists out all the existing input types. I tried looking at it from different browsers, a bit interesting