Advanced Search

Results 1 to 3 of 3

Thread: Identifying Ipod or Ipad

  1. #1
    Join Date
    Feb 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Identifying Ipod or Ipad

    Is there a script available that I can put on a website to identify if it is being viewed on either Ipod or Ipad and if so immediately move to different page ?
    Any help would be appreciated - I know you can identify Mac or PC but that idea didn't seem to work and Ipods/Ipads don't like Flash very much.

    Thanks for your help
    Last edited by SteveHeavy; 02-01-2012 at 06:08 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,681
    Thanks
    43
    Thanked 3,128 Times in 3,094 Posts
    Blog Entries
    12

    Default

    You are better off using just one page and serving your content in a way that any browser can render it. If you have Flash for instance, it's not the Flash you want the user to see, rather a video or a movie, perhaps you just want them to hear a sound. There are scripts for that. They will serve - say video, using the HTML 5 video tag to browsers like iPhone, while using Flash to show it to browsers like IE 7.

    One such script is jPlayer:

    http://www.jplayer.org/

    But if you must detect iPhone/Pad/Pod, the browsers used by those devices all have userAgent strings that can be detected:

    Code:
    <script type="text/javascript">
    if (/iphone|ipod|ipad/i.test(navigator.userAgent)) {
    	location.replace('someother.htm');
    }
    </script>
    That code in the head of the page should take the iDevice user to a separate page, in this case - someother.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John

    Thats great

Bookmarks

Posting Permissions

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