mobile-website

Mobile or desktop browser detection and redirect to respective web page

♀尐吖头ヾ 提交于 2019-12-28 16:18:44
问题 I'm building a website in PHP which contains flash in its index page. I want to redirect users who are accessing my site via any mobile browser to page m.index.php which doesn't contain flash(simple page) for loading purposes. For others who access via desktop browser to index.php which contains flash in it. How can I redirect each user based on their platform? 回答1: You could use .htaccess like in this answer or in this answer or you could check the user-agent in php: <?php $useragent=$

Why is UIWebView canGoBack=NO in iOS7?

不问归期 提交于 2019-12-28 05:47:04
问题 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

Why when my desktop screen and mobile screen have the same resolution don't they display the same thing?

女生的网名这么多〃 提交于 2019-12-25 03:13:37
问题 For example, one my desktop one of my 50px wide button is viewed on my desktop it looks like it occupies about 5% of the screen space as expected. But when viewed on my Android device with the same horizontal resolution it looks like it occupies about 15%. Can anyone explain why this is and what I can do to stop it? 回答1: Different displays have different pixel sizes. You hear this referenced as DPI, or dots-per-inch, which is physically how many pixels there are per inch. In your case, your

Consistently update page with appropriate jQuery Mobile styles

荒凉一梦 提交于 2019-12-24 21:06:28
问题 I have a list of items with which I would like to view more details of them when I click on it. The information for these items isn't available and I need to make an API request in order to get the necessary data which I then render in a jquery template. The template is then added to a jquery mobile page. Here is some of the code in question that I am using to try and update my page function updateProductDetails(data){ var productDetailsData = data['product'] var productDetailsPage = $("

Which markup language to use for the new Web site? (Desktop & Mobile)

浪子不回头ぞ 提交于 2019-12-24 08:04:10
问题 I need to redesign the old site and was thinking what would be the best Web markup language to use. Here are my two questions. Please help me to find the right answer to both or any of them: What's the optimal Web standard for desktop users? HTML? XHTML? Anything else? What version of it (e.g. "XHTML 1.0 Transitional")? What is the optimal markup language for mobile users? The site I'm going to redesign is about applications for mobile devices. So, naturally I have a lot of mobile visitors.

Angular2 Web vs Mobile TemplateURL

那年仲夏 提交于 2019-12-24 01:42:09
问题 I'd like to reuse components for a web version of my website as well as a mobile version. The websites are vastly different so responsive design is not feasible. Ideally, there would be a way to provide multiple templateUrls based on the screen resolution, but I don't think something like this exists. Example: @Component({ selector: 'multiplatform-component', templateUrl-sm: 'app/sm.html', templateUrl-md: 'app/md.html', }) What is the best way to approach this? 回答1: You could create global

Do i need to specify CSS for media=“handheld” and use of CSS media queries if I'm making a simple mobile site for iphone, android, blackberry only?

喜欢而已 提交于 2019-12-24 01:17:51
问题 Do i need to specify CSS for media="handheld" and use of CSS media queries media="only screen and (max-device-width:xxxpx) " if I'm making a simple mobile site for iphone, android, blackberry only? Or media="all" or media="screen" would be enough? I'm only targeting Blackberry 4.6+, iphone and android. 回答1: It depends on what kind of devices/browsers are you targeting at. For example s60 browsers behave differently than iPhone, Android, Opera mini and similar browsers. Here is a nice article

Webpage with wide iframe is not scrollable on an iPhone with viewport

浪子不回头ぞ 提交于 2019-12-24 00:39:51
问题 I have a webpage aimed at mobile devices (e.g. iPhone & Android). This page has an <iframe> (that obviously includes another webpage to render). On the iPhone the page (and the iframe) render OK. I have set the <meta name="viewport" content="width=device-width" /> , which should make it set the viewport width to about 320ish (or whatever safari uses now). However the content in my iframe is wider than 320ish pixels wide. This causes a problem because the iframe is truncated. The iPhone web

Create WURFL patch matching partial user-agent

五迷三道 提交于 2019-12-23 18:26:01
问题 I'm using WURFL to identify whether a user is on a mobile device. Some User-Agent strings are incorrectly recognized as mobile devices which in turn causes the content-type to be set incorrectly. Here an example of a real life user agent behaving like this: Mozilla/5.0 (GTmetrix http://gtmetrix.com/; X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 The content-type then is set to application/vnd.wap.xhtml+xml instead of text/html . I would like to add an entry to

Is there a way to detect 3G and 2G connections speed on mobile phones and handheld devices?

☆樱花仙子☆ 提交于 2019-12-23 18:16:03
问题 Is there a way to detect 3G and 2G connections on mobile phones and handheld devices? Like If I want to deliver High-end Website when user is on 3G and Highly optimized version if user is on 2G. 回答1: In Android 2.2+ there's a JS object for that. You can write out a class for CSS use based on connection type. But it's not available on iOS for mobile web sites as far as I know. var connection, connectionSpeed, htmlNode, htmlClass; connection = navigator.connection || {"type":"0"}; // fallback