Mobile detection/redirect suggestions

Discussion in 'Web Design and Development' started by fig, Jun 6, 2013.

  1. fig
    macrumors 6502a

    Joined:
    Jun 13, 2012
    Location:
    Houston, TX
    #1
    Hey folks, wondering if anyone has any good resources or scripts for mobile detection?

    I've used a few in the past that have worked, and currently I'm finishing up a project that will have a one page mobile site and a full standard site. I'd like to have an option for the mobile user to view the full site after initially being directed to the mobile site, but I'm trying to figure out how to keep them from being redirected back to the homepage (ideally without building a redundant set of pages for them to be directed to).

    Any ideas? Thanks, appreciate it.
     
  2. macrumors 65816

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #2
    Add a session variable.

    Something like mobile = false. Have your magic script detect mobile and change mobile = true.

    Allow the user to click a button that changes the mobile = true back to false. Have the user check as an if statement surrounding the mobile script detection. At the very top default the user selection to false.

    Wow, It may actually be easier to put this in code instead of pseudo.
     
  3. fig
    thread starter macrumors 6502a

    Joined:
    Jun 13, 2012
    Location:
    Houston, TX
    #3
    Got it, I'm with you in theory.

    A friend gave me http://mobiledetect.net/ to check out which looks like it does a nice job of detection, just need to figure out how to integrate the variable idea.
     

Share This Page