mobile-website

Facebook URL schemes on a mobile website, open app if its installed, otherwise go to the webpage

不打扰是莪最后的温柔 提交于 2019-11-27 21:01:44
问题 I am creating a hybrid desktop/mobile website that all share the same pages, aka I do not have two separate URLs for desktop and mobile. I am trying to get Facebook links to open in the native Facebook app, if possible, otherwise go to the regular URL. Is there something out there in the Facebook schemes that handles that automatically? Basically, if mobile app is not installed or if the user is on a desktop, go here: https://www.facebook.com/pages/[pageid] If mobile app is installed, then go

Why is UIWebView canGoBack=NO in iOS7?

。_饼干妹妹 提交于 2019-11-27 20:42:33
I'm embedding this web site into my app like this: NSString *url = [NSString stringWithFormat:@"https://mobile.twitter.com/search?q=%@", @"@test OR #test"]; url = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; [self.twitterWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]]; self.twitterWebView.scalesPageToFit = YES; And I have 2 buttons for going back and forward in this web site. I'm calling [self.twitterWebView goBack]; and [self.twitterWebView goForward]; accordingly. This works fine on iOS 6 but on iOS 7, my web view's canGoBack and

Javascript console.log() on HTC Android devices and adb logcat

狂风中的少年 提交于 2019-11-27 18:22:33
I am developing the application in HTML which is calling the console.log() from Javascript to provide me logs during the development about what happens in the web page code. Unfortunately when I use the adb logcat command to check logs I can see output from all other applications, but not the output from my JavaScript code. I can see even the log from web browser that the page is loaded, but not console.log() output from my JavaScript code executed in the web browser. According to information on this page ( http://developer.android.com/guide/webapps/debugging.html ) it should work. I am

What are cross-browser, cross platfom web safe fonts?

与世无争的帅哥 提交于 2019-11-27 15:43:00
问题 How to make cross browser, cross platform and all devices compatible css font stack? 回答1: You cannot guarantee the fonts that will be used on a mobile device the same way you can guarantee which fonts are available on a normal computer. A safe bet is to use a generic font family that can be interpreted by the mobile browser to show you the relevant font, e.g. font-family: serif; /* (e.g., Times) */ font-family: sans-serif; /* (e.g., Helvetica) */ font-family: monospace; /* (e.g., Courier) */

Getting (mobile) device name from javascript

青春壹個敷衍的年華 提交于 2019-11-27 14:26:20
Is there a way to get the name of a mobile device (e.g. "John's iPhone" ) using javascript? Maybe I wasn't very clear... what I meant is not whether it's an iPhone, iPad etc. but the "device name" - for example it can be "John's iPhone". You can't do this through javascript for a web app running in a native browser - javascript generally doesn't have access to this personal identifying data. One possible way is to use a framework like PhoneGap which may have an API to access the device name. But then, you can only deploy your web site via an app store, so this could be very limiting based on

JQuery Mobile Table

安稳与你 提交于 2019-11-27 14:05:56
问题 Can anyone point me to any sample or can provide any sample of a Jquery Mobile table please? I've seen the demos on their website and found no tables. I need to be able to create a table that will look good on Mobile / iPad. 回答1: Try this layout instead <ul> <li> <!--first item --> <table> <tr> <td>Heading1</td> <td>Meaning1</td> </tr> <tr> <td>Heading2</td> <td>Meaning2</td> </tr> <tr> <td>Heading3</td> <td>Meaning3</td> </tr> </table> </li> <li> <!-- second item --> <table> <tr> <td

Android browser refreshes page after selecting file via input element

旧城冷巷雨未停 提交于 2019-11-27 11:59:39
问题 I have a mobile web page which includes an input element of type 'file', to allow users to upload image files to a server. The page works fine on iOS, and on a Nexus 4 (Android 4.2.1) in the Chrome Browser. When I use a Samsung S3 (Android 4.0.4) with the default browser clicking on the 'Choose file' button opens the image selection dialog as expected, however after I choose an image and close the dialog the web page gets refreshed, so I lose the image that was selected. Has anyone else seen

Performance problems with HTML5 Canvas in some mobile browsers.

六月ゝ 毕业季﹏ 提交于 2019-11-27 09:54:47
问题 Hi I have a Webapp that should be able to run on both Smartphone and Desktop Browsers alike. While I was expecting to get some curious behaviour on small devices like the Iphone, I was pretty confident that it would run well on an Android Galaxy Tab which is the Android Device that I can run tests with at the moment. Now I have installed a bunch of Browsers on the Galaxy Tab to test things with: Android Native Browser Chrome for Android Firefox for Android On the Desktop I have used Firefox

Difference between visual viewport and layout viewport?

帅比萌擦擦* 提交于 2019-11-27 09:05:06
问题 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. 回答1: 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

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

╄→гoц情女王★ 提交于 2019-11-27 08:59:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . 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. 回答1: I rely on two elements to optimize websites for mobile browsers (especially Android and iPhone): Meta tags: