Results 1 to 8 of 8

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Optimizing my website for Mobile Safari - or redirecting

  1. #1
    Default Optimizing my website for Mobile Safari - or redirecting
    Does anyone know if its possible to add some HTML code to the index.html file of my website (or perhaps adding a script or plug-in or something to the root folder of my site) that would recognize if the person visiting the site is using mobile safari on an iPhone ~ and if they are, it would redirect them to an alternate web page of my choosing...

    In short, I am a photographer and my website (which showcases my photographs) is heavily reliant upon Flash, which as we all know, the iPhone obviously doesn't support. Visiting my website on my iPhone doesn't work at all, and just brings visitors to a page displaying the background color of my site...

    As a solution to this issue, I would like to know how I can redirect mobile safari users to my .mac iPhoto gallery index page if they attempt to visit my website via an iPhone...

    Any ideas about this?

  2. #2

  3. #3
    a little html, and a little JavaScript can go a long way! throw in CSS and you've got 100% detections

    I've written LOTS of code to optimize for sites for the iPhone!

    visit my puppy's site http://jpassoc.com/junior it's runs differently on the iPhone. We have movies and slideshows (that are presented differently on safari mobile)
    http://jpassoc.com/x -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1

  4. #4
    Livin the iPhone Life Eurisko's Avatar
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    3,307
    Thanks
    12
    Thanked 562 Times in 483 Posts

    Quote Originally Posted by jakecigar View Post
    visit my puppy's site http://jpassoc.com/junior
    Oh my god! My retina's just burned out!
    Get "iPod & iTunes for Dummies", it'll change your life.

  5. #5
    He's a dalmatian... the correct color for accents is RED!
    http://jpassoc.com/x -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1

  6. #6
    I added the following to my website and it now redirects just as I'd intended!!

    Code:
    <script language=javascript>
    <!--
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
    {
    location.replace("*REDIRECT LINK HERE*");
    }
    -->
    </script>
    Does anyone know how I would go about adding a webclip icon to my .Mac Photo Gallery web page so that adding a web clip of the gallery to my iPhone would show a icon graphic icon of my choosing? I know the specs of how to create one of these icons, I just don't know how/where to put it for my .Mac photo gallery...

    Any thoughts?

  7. #7
    <link rel="apple-touch-icon" href="/whatever.jpg"/>
    http://jpassoc.com/x -- with free itunes under the puppy!
    If I help you out, please press THANKS!

    3g QuickPWN'ed with 2.1

  8. #8
    Livin the iPhone Life Eurisko's Avatar
    Join Date
    Aug 2007
    Location
    Toronto, Canada
    Posts
    3,307
    Thanks
    12
    Thanked 562 Times in 483 Posts

    Quote Originally Posted by jakecigar View Post
    He's a dalmatian... the correct color for accents is RED!
    Get "iPod & iTunes for Dummies", it'll change your life.

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •