Detect iPhone but give option to view Full Site

Hello,
I have figured out a way to redirect iPhone users to another version of the site :

if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{
location.href='http://www.mysite.ca/iphone/';
}

I would like to also have the option (link), in the iPhone site, to view the Full Site. Problem is, I have the above Javascript code in a .js file that is in all the pages so whenever someone on an iPhone views a page they will be re-directed.

Do I need to use cookies (when they click “View Full Site”) so that the re-direct code does not take effect?

Thanks for any help,
Mark

Why would you want your iPhone visitors to be limited in the first place? Why not just show the full version page by default and have a link for your mobile edition, that is the common convention and it is what is expected.

I may yet provide a link like this (to the mobile (iPhone) version).

Do you have any examples of sites that work like this? Almost all of the sites that I have seen auto-detect and redirect.

What I am thinking of doing is creating a seperate css. Although I am not sure how to do this with a link, and unsure how to keep track when they change pages.

Thanks, Mark.

Generally speaking, most websites do not auto-detect and redirect, the majority of websites browsed on an iPhone device do nothing in terms of adapting themselves to mobile phones for two reasons… firstly the iPhone can browse at full screen the same as a normal computer (it just uses zoom to adapt to the low amount of screen space) and many people use this without issue. Secondly it uses the Safari browser which means that it’s wide support of web standards qualifies it to be just as adept at rendering sites properly as any desktop computer. In conclusion you should probably just leave your website as is (unless you have reels of pages of content per page, then you may want to cut down on all the junk).

The problem with your script is it uses JavaScript which means that iPhone users have to wait for the regular page to load, only to be forced to go to a cut down limited version (which they do not need), you are inhibiting the user experience and wasting bandwidth. :slight_smile:

Walmart (walmart.com/wap/iPhone/) has a different site for mobile users. I think the website/ interface they have created for use on the iPhone will convert into more sales for their website because it is much easier to navigate not only on the iPhone, but also on other mobile devices.

They use Javascript and it seems to load much faster than the entire website takes to download.

I too would like to know how to still make the full site available for viewing if the user wishes.

If it’s so important to have this option, why not have an initial welcome page that provides links to desktop and mobile versions of the site? A bit extreme, I know, but…

Just house the mobile page on a subdomain or something, the general convention is m.yoursite.com, then people can choose whichever version they want to use.

PS: Ldog187, try to avoid digging up 6+ month old threads, make one of your own! :slight_smile:

I found this website via a Google search for the topic. Too bad Google didn’t tell me this site would not be helpful whatsoever.

Six months ago when the question was asked, why was it not answered? What kind of help was offered? Telling someone that their idea is not what most websites do and that they do not auto-detect and redirect helped no one and did not answer any question. (By the way,you are wrong because that is becoming the standard.)

I didn’t start a new topic because this one was already here.

Why send the user to a website that is hard to navigate when you can create one that is easy to use?

My work gets 85% of it’s mobile visitors from the iPhone. Less than .005% convert into sales. Our belief is that is it to difficult to purchase items on the iPhone because you have to zoom in and out all the time trying to find the next area that needs attention during the checkout process. Streamlining this for the iPhones screen resolution will convert more shoppers into buyers.

I am sure I can find this answer elsewhere, and I don’t expect to get anything useful from this site.

If you are going to have the “I am smarter than you” attitude at least answer the questions that are asked. This will prove you are smarter than me.

:confused:

cantoni.mobi/ has an extensive list of mobile websites.

You may be able to find a mobile site that does what you are wanting to do.

Then just look at the source code and you may be able to find the code needed to do what the topic of this thread has on it.

Sorry but you are entirely mistaken, it is not the majority of websites which redirect visitors to a separate off-site page, the very nature of what you are stating is physically impossible based on the thousands of different models of handsets which exist and the amount of Header redirects which would need to occur in order to successfully redirect every mobile user (or at least the ones which cannot make use of a regular design effectively). I do happen to follow the philosophy that you should optimize for the browsing experience and maintain usability, and having a separate mobile website can help you achieve that.

However I do take issue with any claim which states (wrongly) that using some voodoo script you can teleport all the right visitors to the right places, it simply isn’t that simple and anyone who’s actively involved in developing for more than just the iPhone (co-currently a multitude of devices) would know this - on the basis of CSS support for handheld issues, CSS3 media selector requirements (For certain devices) and the lack of a model outside of hitting up every single mobile device by name and triggering a redirect - which isn’t reasonably an acceptable method. While dot mobi has proven to be a semi solution (having a TLD rather than a subdomain) it isn’t actually that popular an extension and most mobile users aren’t even aware a mobi extension even exists (according to usability studies). The answer was provided according to the information I know is factual and the facts show that identity redirection isn’t a feasible solution. :slight_smile:

See the Opera site: http://www.opera.com/ -> “View mobile site” button.

The mobile site version is: http://www.opera.com/?viewmobile as you see it has “View full site” button.

Rather convenient to my mind.