?
Solved

How do I facilite a "full page" option on a mobile website?

Posted on 2014-01-31
2
Medium Priority
?
204 Views
Last Modified: 2014-02-01
Here's the code that I have sitting on the desktop version of my site:

<?php
include 'Mobile_Detect.php';
$detect = new Mobile_Detect();
if ($detect->isMobile()) {
// Any mobile device.
header("Location:mobile/index.php");
exit();
}
?>

My client wants a button on the mobile version of the site that allows them to see the desktop version. How would I facilitate that if the "Mobile_Detect.php" file is automatically routing a mobile user to the mobile site?

I had a couple of ideas, but they all struck me as potentially convoluted, so I figured I would ask those who probably have already done this.

What do you think?
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39825674
In your button pass a parameter in the querystring of the url, have a check on page request for the querystring param and if set then use a session/cookie to hold the preference and only run your mobile detect if this is not set.
0
 

Author Comment

by:brucegust
ID: 39826224
That's what I was thinking, but didn't want to proceed without first checking to see if there was another option.

Thanks, Cathal!
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question