mobile-website

how to prevent iOS safari alert when trying to open non-installed native app?

人盡茶涼 提交于 2019-11-26 23:57:39
问题 I've been looking for a way to open a native iOS app from the browser. I found a decent solution here: Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps? This solution works great when you have the app installed. but when a user doesn't have this app installed - safari fires an error message which says "Safari cannot open the page because the address is invalid." Is there a way to prevent this behaviour and instead to prompt the user to download

Change Django Templates Based on User-Agent

随声附和 提交于 2019-11-26 23:56:50
问题 I've made a Django site, but I've drank the Koolaid and I want to make an IPhone version. After putting much thought into I've come up with two options: Make a whole other site, like i.xxxx.com. Tie it into the same database using Django's sites framework. Find some time of middleware that reads the user-agent, and changes the template directories dynamically. I'd really prefer option #2, however; I have some reservations, mainly because the Django documentation discourages changing settings

Media query not working in IE9

拟墨画扇 提交于 2019-11-26 22:39:47
I'm having a strange problem that only occurs with IE9. I'm working on a web page that has a desktop layout, and a mobile layout. Same HTML, different CSS. The problem happens with the code below: @media only screen and (min-device-width: 768px) and (max-device-width: 1024px), only screen and (max-device-width: 640px) All browsers, with the exception of IE9, show desktop site as needed. Mobile browsers correctly show the mobile layout. The problem with IE9 is that it also shows the mobile layout. Now if I remove the words "only" and "screen" from the above code, IE9 then correctly displays the

Which Devices Support Javascript Geolocation via navigator.geolocation?

风流意气都作罢 提交于 2019-11-26 22:13:32
问题 The iPhone supports geolocation in mobile Safari via the following call: navigator.geolocation.getCurrentPosition( function(pos){ var lat = pos.coords.latitude; var long = pos.coords.longitude; }, function(){ /* Handler if location could not be found */ } ); I'd like to build a good list of devices that have one of the following: support this feature out of the box , or support this feature with an upgrade, or support geolocation with equivalent fidelity of data with some other snippet of

iOS Safari – How to disable overscroll but allow scrollable divs to scroll normally?

你离开我真会死。 提交于 2019-11-26 19:18:01
I'm working on an iPad-based web app, and need to prevent overscrolling so that it seems less like a web page. I'm currently using this to freeze the viewport and disable overscroll: document.body.addEventListener('touchmove',function(e){ e.preventDefault(); }); This works great to disable overscroll but my app has several scrollable divs, and the above code prevents them from scrolling . I'm targeting iOS 5 and above only so I've avoided hacky solutions like iScroll. Instead I'm using this CSS for my scrollable divs: .scrollable { -webkit-overflow-scrolling: touch; overflow-y:auto; } This

Redirect mobile devices to alternate version of my site

喜夏-厌秋 提交于 2019-11-26 18:02:52
问题 We've got an alternate version of out website ready for mobile devices. The content we serve is different and it works well. What is the best way to detect which version to serve. We don't have a list of all mobile devices so to use the user-agent header is tricky as we may miss something. We thought about useing device screen width - but what happens if the mobile device doesnt support javascript. How do we sniff this ? 回答1: You could use a device description database (such as WURFL) which

Way to do content adaptation to mobile

南楼画角 提交于 2019-11-26 17:57:47
I creating a site and want turn it mobile ready, i see people talking about very very old technology but everything looks walking to an web mobile experience I see people talking about frameworks] to mobile web development, also a friend told me about (wurfl)(' http://wurfl.sourceforge.net/java/wall.php ) to detect mobile features and build an apropriate css file doing content adaptation. I see people defining three or four css files and using media queries to match device by screen size with responsive fluid design, someone told me that you cant create one content because flow is different in

Is there a way to force horizontal / landscape layout on mobile devices?

坚强是说给别人听的谎言 提交于 2019-11-26 17:46:30
问题 I'm building a mobile version of a website, and in this specific case it would look perfect in horizontal layout. Is there a way to force this layout no matter user setting are? Answer with some universal way is appreciated, but also if you know how to achieve this on any specific platform (iPhone, android..) so maybe we can collect a decent set of rules to target majority of mobile users. 回答1: There is a hack that will accomplish this, but I seriously advise against using it - your design

Media query not working in IE9

梦想与她 提交于 2019-11-26 12:19:22
问题 I\'m having a strange problem that only occurs with IE9. I\'m working on a web page that has a desktop layout, and a mobile layout. Same HTML, different CSS. The problem happens with the code below: @media only screen and (min-device-width: 768px) and (max-device-width: 1024px), only screen and (max-device-width: 640px) All browsers, with the exception of IE9, show desktop site as needed. Mobile browsers correctly show the mobile layout. The problem with IE9 is that it also shows the mobile

Sencha Touch or jQuery Mobile? [closed]

折月煮酒 提交于 2019-11-26 11:55:16
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I wonder if I were to develop a mobile Web app (now, in two weeks, or in a month), which one should I go for? Which one would you mobile Web developers go for? If jQM 1.0 were officially released today, I would most likely embrace it (as long as it actually delivers what it