Jump to content
Sign in to follow this  
Terry Vogelaar

iPhone web development

Recommended Posts

I am building an alternative site for a Flash based site to be viewable on the iPhone. But I keep on trying things that apparently also don't work.


I tried using an iframe to have a scrolling field on the page. The topmost content showed, but I was unable to scroll it, because the entire page was scrolling instead.


I tried to include an MP3 using the Embed tag. Works fine on my Mac, but not on the iPhone.


And apparently some things work on some iPhones, but not on others. I found a detection script:


if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)) {

document.location = "iphone/index.html"; // The iUI site

} else {

document.location = "html/index.html"; // The iframe site for all the other non-Flash supporting devices


This works fine on mine and on the iPhone Simulator on my Mac. But not on my client's iPhones. Fortunately I found a PHP-based detection script that did works on all.


I use iUI, a JavaScript/CSS framework intended for the iPhone. And I discovered that if I put a link in it without specifying a target, the URL gets embedded in the page somehow. This also works on the iPhone Simulator and on Mac Safari when visiting the iPhone site. But again, not on the client's iPhones. The location bar reads www.site.nl/iphone/#_home on my devices, but www.site.nl/iphone/home.html on theirs.


I thought about asking them if they have the newest OS, but thought that it actually is good that the client runs into problems with the site, so I can correct it before the site is launched.


In my opinion, this has everything to do with the great Flash war of 2010, as Adam calls it. I'm not a Flash fan and if I have to choose a side, I'm on Apple's. But I think Apple talks nonsense about this topic too. Their mobile Safari is good, but actually still half-baked. Apple claims HTML 5 is a industry standard, but it is NOT; it is not even a W3C recommendation (yet). The worldwide web is in its teenage years. The great Flash war of 2010 is a symptom of it; so are all the other half-baked products like JavaScript and CSS everyone has to rely on. It is just time for the worldwide web to grow up. To come with true standards that are as easy to develop as Flash, but are reliable to work on every web browsing device. We are not there yet...

Share this post

Link to post
Share on other sites

Your right, but Flash doesn't solve your problem and in a way just further deviates from the "standard". The truth is that "standards" don't exist. The HTML specifications are just that, specifications. They are not really "standards", or at least not in the way we want to understand them. A standard can only be a standard if EVERYONE agrees to only live within those walls (hmmm... sound familiar). When you have many different private organizations all with their own private motivations then the "standard" falls apart. This is why when I code a "standard" web site using CSS and HTML I then have code "exceptions" for IE6, IE7, and IE8. As you noted here, if I want to target an iPhone, I might also have to code exceptions to deal with limitations on that platform (screen size, lack of media support, etc). Flash is no better and maybe worse since not all Flash players on all platforms are equal. There currently is no Flash player on a mobile device that even adheres to Adobe's "closed" Flash standard. Flash 10.1 will fix that, but even then it will only run on the very latest Flash devices. Add to that the fact that I also have to use outside tools to make the Flash content. Tools separate from my HTML tools.


Apple has come to realize this issue so they are creating a "closed" standard for the iPhone and Apps (not the web). With a closed standard they can make sure that all their devices, running their software, and their apps work as expected and meet their software "standards". That isn't open in any way. On the web they are saying "open", but that again only means they are supporting the "specifications" with Safari and Webkit. The specification doesn't mandate things like which codec to use for video streaming in HTML5, but Apple (and most others Microsoft, Google, etc.) are backing H.264 which isn't an "open" format. The HTML specs just applies to the code the web server supports there is still the browsers side and when we get there all bets are off so to speak.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing

    No registered users viewing this page.

  • Who's Online (See full list)

    There are no registered users currently online