ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to detect mobile device and then give user a choice.

June 10, 2010 6:16pm

Subscribe [1]
  • #1 / Jun 10, 2010 6:16pm

    Todd D.

    460 posts

    This question is related to a series of posts I have in this thread. However, since I’m not making much progress in that specific thread… I thought it best to open it up a bit more to the general community and get some ideas there.

    This is what I want to do.

    Detect a user connected via a mobile device and then automatically forward that user to a choice page where they can decide to view the site normally or through a mobile optimized template structure.

    In order to detect mobile devices, I’m using the MX Mobile Detect Plugin.

    Currently a user who visits the site on a mobile device automatically gets forwarded to the choice page. On the choice page, we set a cookie. If the user chooses to view the site normally, we have the normal templates check for the cookie so that it will not forward them if the choice cookie has already been set. However, with all our attempts, they still get forwarded for some reason. I have triple checked that the cookie is set. We have also tried numerous ways to prevent the forwarding if a person has the cookie.

    Since this path doesn’t seem to be a successful one, does the community have any suggestions on how to accomplish this? Surely others have solved this challenge.

    How do you detect mobile devices and then give the user a choice to view the site?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases