2.2 feature that no one knows about?

Discussion in 'iPhone' started by milani, Nov 25, 2008.

  1. milani macrumors 68000


    Aug 8, 2008
    There was an update that I only noticed. It will only apply to those people developing web content for the iPhone, but I've noticed the following:

    You could in 2.1 save web apps (or websites with specific meta tags) to the homescreen, and those pages would reopen in a full screen mode (without any of the Mobile Safari related buttons). So basically it would run just like an application. However, with 2.1 you were confined to the page you were on, and clicking any link would close the full screen and open Safari and load the new page in Safari.

    However, with 2.2 if you click a link it will actually load in the same full screen mode, so you could effectively develop completely transparent web applications (that would appear to be the same as its OS-based counterpart). I believe that the meta tag was discovered prematurely in 2.1, and that it was only optimized in 2.2 which explains why it works not but didn't fully work before (in terms of clicking a link and going back to regular Safari).

    So a neat little update which will improve the quality of web apps or websites that exploit the feature.

    If you have NO idea what I'm talking about, navigate to this link: http://univoxdesigns.com/mobile/home.php on your iPhone, and then save it to the home screen. Once it is on the home screen (the icon could change to say "ud") just click on it, and it will reopen in a full screen mode. Now prior to 2.2 if you clicked on any of the links in the header (which go to the same page, by the way) it would open up Safari, but now those links just load naturally in the full screen mode.

    I assume most people couldn't care less about this update, but I was pretty excited as I'm exploring iPhone web related development.

    By the way, the meta tags in question:

    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    With the top one you can decide whether to have a gray bar or a black bar (where it says the time and what not), while the latter allows it to go to full screen mode after it's added to the home screen
  2. Small White Car macrumors G4

    Small White Car

    Aug 29, 2006
    Washington DC
    I'm excited becaus we might see more apps that have been rejected by the app-store appear in this form.

    Obviously there are things that won't work this way, but there are lots of little things that can be done here and circumvent the app-store approval process. Should be fun to see where this leads.
  3. Shoesy macrumors 6502a


    Jun 21, 2007
    Colchester, UK.
    Thats actually really cool.

    Do you know of any other sites that make use of it?
  4. milani thread starter macrumors 68000


    Aug 8, 2008
    This is very true, especially as (read below) there are many other things that you can theoretically do with Mobile Safari specific meta tags, and it appears that since Apple doesn't publish much on them, developers are basically discovering new functionality all the time.

    No I'm not really aware. I only discovered the iPhone related meta tags by accident actually. It's definitely an aspect of Mobile Safari that isn't very well published.

    Having said that, there might be information on Apple's development website. There is a part of that site that is specifically dedicated to web app/Mobile Safari development, and it might have been updated, but last time I looked at it there wasn't all that much info on meta tags or the rest of it.

    There are some tags that actually allow a page to be changed based on what way the iPhone is oriented. So if you turn the iPhone on its left side a page will open, and if you turn it on its right side a different page will open. I don't know if other things like shaking the phone do anything (or could do anything), but it's certainly something very interesting in terms of creating web related interfaces or methods of navigation that are iPhone specific.

    I'm planning to explore that aspect of the code in future because you could develop some very interesting iPhone specific content, and hopefully there are some more meta tags unearthed or more hidden functionality planted in Mobile Safari in future.

    I believe that Apple is slowly building more functionality into Safari. To what end I can't be sure, but I agree it will be very interesting to see how these types of things are exploited by developers.
  5. ppc750fx macrumors 65816

    Aug 20, 2008
    Really? Huh.

    Last I checked (which admittedly was the WWDC seminar on iPhone web app development), the way this was done was using Javascript to determine the width (or height). This very well may have changed though -- I can't say I've paid much attention to iPhone web development.
  6. milani thread starter macrumors 68000


    Aug 8, 2008
    Hmmm now you've got me thinking. In reality it was probably a combination of javascript and meta tags, admittedly I haven't looked at that code in a few months either.

    I remember looking at a specific company who was developing the tech, and basically if you orient the iPhone in one direction it would load a new page, so you could have a navigation based on orientation (left for News, right for Sports). It was probably javascript enabled by meta tags - because I think you need a specific tag to let the iPhone know that turning the phone sideways DOES NOT just flip the website sideways - I know what you're saying though. Now you've got me curious haha, I'm going to have to look into this!

    Either way, it seems that Apple is building more functionality into Mobile Safari which I think is pretty cool. I especially like how you can actually determine the color of the top bar on the phone (like the bar that says 3G or E) just by a meta tag, which sort of suggests that web-kit is becoming a more ubiquitous component of the UI (or that it always was).

Share This Page