SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2010
    Posts
    70
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Mobile detection

    Hi. I have created a website in Flash and embedded into html using SWFObject. I have also create a micro site for mobile phones. When the user loads up my page, it should detect whether than are on a normal browser, therefore displaying the flash website, or if they are trying to access it from a mobile device, therefore displaying the micro site. What would be the way in achieving this?

    cheers

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,839
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The best way is to ask - that way if their mobile device is one that supports regular web pages you are not forcing them onto the wrong version.

    Code:
    <p>Are you using a <a href="reg.html">Regular Browser</a> or a <a href="mobi.html">mobile device</a>?</p>
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •