This isn’t really a technical question, but I essentially have two sites, a mobile and a regular one. I am currently able to detect the device the user is on and redirect them to the mobile site, which is a sub-directory of my regular site. The thing is I need an option for the user to be able to view the regular site if they want to. My problem is that if I provide them a link to the regular site, they will automatically be redirected back to the mobile site. The differences between the two sites is much more then just a style sheet which can be swapped out at will. The solution I though of was to create a cookie variable (session if they are disabled) with a value after they choose if they want the mobile or regular site (1/0 I guess). Based on that variable enable or disable the code that does the redirect. Is this the correct way to do this? Or is there a more elegant way to do this?
This isn’t really a technical question, but I essentially have two sites, a mobile
Share
I successfully implemented this method and works smoothly enough for my tastes. In the if on the regular site, just be sure to check for both the GET variable which would have the value of either 1 or 0 AND the cookie or session variable you set. This way after they take the initial link from the mobile site and you set the session or cookie variable, you don’t have to carry the GET variable over with every subsequent link.