Skip to main content

Posts

Showing posts with the label mobile-safari

Fixed positioning in Mobile Safari

Is it possible to position an element fixed relative to the viewport in Mobile Safari? As many have noted, position: fixed doesn't work, but Gmail just came out with a solution that almost is what I want – see the floating menu bar on the message view.

List of known differences between "Safari on iPad” and "Safari on iPhone”

My website looks perfect on the iPhone but looks sub-optimal on the iPad. I'm having a lot of trouble finding information on the differences between iPad's webkit/safari rendering engine and iPhones' webkit/safari rendering engine.

Is there any use of favicon.ico for mobile websites?

Is there any use of favicon.ico for mobile websites? will it be shown in browser address bar and tabs in mobile websites We use apple icons <link rel="apple-touch-icon" href="/apple-touch-icon.png"/> in mobile websites. what about Android, Blackberry and Windows 7 phone? Is favicon.ico useful for other mobile phones other then iOS mobiles Source: Tips4all

Force a WebView link to launch Safari?

I have a UIWebView embedded within an iPhone app of mine. I want to be able to have certain links within that webview open into the full Mobile Safari app (i.e. not my embedded version of it). Is there a simple way to structure some of my hrefs to force this, instead of every link opening within my embedded webview? Thanks.

How to target iPhone 3GS AND iPhone 4 in one @media query

I am trying to implement alternate layouts for both the iPad/iPhone and older iPhones as well. I have established that the best method is to use @media queries from the CSS3 spec, As such these are my media queries at the minute: @media screen and (max-width: 1000px) { ... } Above is for small desktop and laptop screens. @media screen and (max-width: 700px) { ... } Above is for the iPad and VERY small desktop/laptop screens. @media screen and (max-device-width: 480px) { ... } Above is for iPhone 3GS- and mobile devices in general. However, the new iPhone 4 with Steve Jobs's all-singing all-dancing "retina" display means that it has a pixel ratio of 2-1 meaning 1 pixel actually appears to the browser as 2x2 pixels making its resolution (960x640 - meaning it will trigger the iPad layout rather than the mobile device layout) so this requires ANOTHER media query (only so far supported by webkit): @media screen and (-webkit-min-device-pixel-ratio: 2) { ... } N

How does the iPhone Google image search touch-event functionality work?

When I do a Google image search on my iPhone within the Safari mobile browser, it gives me this beautiful interface for flipping through the images. If I swipe left or right, it browses through the images. If I touch and move up or down, I get what appears to be the native Safari scroll function. Can anyone explain how Google does this? I'm only beginning to learn the Safari API for touch events. It seems like either you capture the touch event to attach handlers to swipe left or right or you let Safari handle the touch events natively, in which case you get the beautiful native Safari scrolling. Can anyone explain how Google captures left/right swipe but not scrolling?

Testing various versions of iPhone Safari

I am developing a jquerymobile App, and things are looking good in IOS5 with the most up-to-date version of Safari, I really need to test some older versions of Safari and its Webkit to ensure things are looking good for most browser versions. I realise I can fire up an old version of xcode with SDK4 , and test IOS4, but what I really need to test is the various versions of Safari, does anyone know how to do this? I'm assuming it is possible to upgrade Safari without upgrading your IOS.

What javascript event gets fired when ios safari gets called from another app

I'm working on a mobile website / iPhone app combination. Upon entering the mobile website, I prompt the user to 'go to the app', 'download the app', or 'use mobile website'. From various entry points to the mobile website, I'm mostly worried about verification emails and text messages, so the user will check email, follow the verification link, enter Safari, get prompted to 'go to the app' and the verification link is sent to the app for it to handle. Now in the same session, if the user gets another email regarding the app, the user will check email again, follow a different verification link to Safari, and I want the 'go to the app' to work the same with the new link. Some quirks are that upon entering the mobile website, the verification link is stored and the URL is switched to site.com/home. The iphone overlay is completely separate from the rest of the site and doesn't have access to the site's storage of the verifi

Long loading times (or not even loading) with jQiery $.ajax on mobile Safari

I'm working on a web app completely made in JS (using jQery) and HTML. I discovered a problem with $.ajax and / or $.get calls which do not load or take veeery long to load. $.ajax({ dataType: 'jsonp', jsonp: 'callBack', url: 'http://mmsrv.local/character/userb', success: function(ret) { $('.charName').text(ret.data.name); $('.charLevel').text(ret.data.level); $('.charExp').text(ret.data.exp); } }); This is my code to load jsonp. At first I thought it's a problem with unsupported jsonp. But even the following code does not work $.get({ url: 'http://localhost/', success: function(data) { alert(data); } }); The 2nd snippet works perfectly on desktop browser, but not on Mobile Safari. The first one loads well in Desktop browser but goes into a "loading-loop" when visited on Mobil