homepage Welcome to WebmasterWorld Guest from 54.227.12.219
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
Forum Library, Charter, Moderators: bakedjake

Smartphone, Wireless, and Mobile Technologies Forum

    
Redirecting? What do you use?
travelin cat




msg:4489960
 7:44 pm on Aug 30, 2012 (gmt 0)

For any of you mobile website developers not using responsive designs, how are you redirecting visitors to the mobile version of the site?

 

Marshall




msg:4489961
 7:57 pm on Aug 30, 2012 (gmt 0)

I'm not. I give visitors the option to select full version or mobile friendly. And, IMHO, I believe that is the way it should be done. Let the visitor decide.

Marshall

travelin cat




msg:4489965
 8:17 pm on Aug 30, 2012 (gmt 0)

Well, ok. Perhaps that is another discussion. But it's not what I asked.

lucy24




msg:4489987
 9:50 pm on Aug 30, 2012 (gmt 0)

Most recent discussions seem to recommend looking at screen size rather than user-agent. One simple measurement instead of a neverending list.

Or did you mean, what exact code, at what stage? php script, htaccess/config, javascript etc?

travelin cat




msg:4489988
 9:58 pm on Aug 30, 2012 (gmt 0)

Lucy, I was thinking more along the line of code. Javascript or something else. There are 3rd party websites that provide a JS that uses their proprietary system, but that scares me because they may or may not be accurate, or even around in a few years/months/days.

lucy24




msg:4490043
 2:28 am on Aug 31, 2012 (gmt 0)

The big drawback to js here is that it can only execute after the page has loaded. So you get your user with a weeny cell phone on a sluggish connection first waiting for the "real" page to load up, and then they have to wait all over again for the cell-phone version.

There are 3rd party websites that provide a JS that uses their proprietary system, but that scares me because they may or may not be accurate, or even around in a few years/months/days.

Are you looking at routines that are called from within your site, but live somewhere else? Worse and worse, because now you've got even more stuff for the user to wait for.

You want something that gets the necessary information before it starts building the page. Or, at worst, before anything but the html has loaded.

:: detour to investigate ::

<ot>
If anyone doubts that g### really uses those "author" tags to generate search results complete with pictures of the author, try the search query I just used. One page, 30 results, 5 white men.
</ot>

Awright, folks, what are we missing here? I'm seeing:

A) responsive site that adapts more-or-less fluidly to the UA that called it up

B) javascript that detects viewport size and/or UA and replaces originally loaded page with alternative version

C) proprietary gimmicks that serve up different page versions and/or different sizes of images based on javascript function called after html (at a minimum) has loaded up

D) php or server file (htaccess etc) that detects UA by name and routes user to appropriate page, and/or builds appropriate page on the fly-- but only if UA is a known quantity, because most UA names do not include viewport size

You're looking for Option E) aren't you?

nomis5




msg:4490074
 7:01 am on Aug 31, 2012 (gmt 0)

I have html pages and right at the top is a check for redirect or not in javascript. The mobile page loads fast if I redirect to it mainly because the mobile page is a cut down version of the main site.

I also use screen size, user agent is far too complicated and needs constant maintenance.

On both mobile and full site there are very clear options to let the user go to the mobile / full version of the page if they wish.

The only complication I came across is that if I redirected a mobile user from the full site to the mobile and they then went back to the full site, the redirect code on the full site automatically redirected them back to the mobile site again.

Got round that by dropping a cookie which indicates the user wants to stay on the full site whatever their screen size.

nomis5




msg:4490076
 7:13 am on Aug 31, 2012 (gmt 0)

Just one more comment that I have mentioned a couple of times previously in other posts. There are sites out there that have mobile and full versions. Some of the more popular ones are now indexed in G mobile results with a direct link to the mobile and not the full site. So G definitely has the technology to recognise the mobile version of a site and serve up the correct url in the mobile SERPS.

That is THE ideal situation to be in. Minimal responsive design code clogging up the page and mobile and full versions.

travelin cat




msg:4490226
 5:25 pm on Aug 31, 2012 (gmt 0)

You're looking for Option E) aren't you?

lucy24, not necessarily. I'm not looking for any "magic", just trying to understand what developers find to be the best way to go. This is truly an emerging area, and my gut feeling is that it is going to be very big, very soon.

So G definitely has the technology to recognise the mobile version of a site and serve up the correct url in the mobile SERPS.

nomis5, they do indeed recognize mobile versions, if you have not yet seen this, you really should: https://developers.google.com/webmasters/smartphone-sites/details

This part stands out:
Annotations for desktop and mobile URLs

To help our algorithms understand this configuration on your site, we recommend using the following annotations:

On the desktop page, add a special link rel="alternate" tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site's mobile pages.
On the mobile page, add a link rel="canonical" tag pointing to the corresponding desktop URL.

lucy24




msg:4490391
 6:33 am on Sep 1, 2012 (gmt 0)

I'm not looking for any "magic"

Why not? It's what I'd be looking for :)

There's a depressing number of postings in clients-from-you-know-where dot com involving people who have to be told "Uh, no, that's not Photoshop. That's magic. It's in a Harry Potter movie."

I have html pages and right at the top is a check for redirect or not in javascript.

Does the js execute before the whole (original) page loads up? That's got to be the single biggest issue with js. Well, apart from users who have it disabled. (Can you turn it off on a phone? You can on the iPad-- but that doesn't need "mobile" site versions.)

nomis5




msg:4490609
 9:33 am on Sep 2, 2012 (gmt 0)

lucy24 - re the javascript loading after the original page, is that always the case? And if so does the whole page (pictures and everything) load before the javascript is executed?

I ask because when a page on my main site gets redirected to my mobile site the delay is about a third to half a second only. It seems very, very fast if the original page needs to be loaded before the javascript redirect and then the mobile page is loaded. I clear cache, history and cookies on my mobile before doing these tests.

Thanks for the link travelincat, I hadn't read that and will implement the G recommendations.

nomis5




msg:4490614
 10:01 am on Sep 2, 2012 (gmt 0)

Just a note on the javascript redirect. The javascript is coded inline in the head section of each page and is not in a separate file. Would this explain why it appears to redirect to the mobile page almost instantaneously?

phranque




msg:4490881
 10:39 am on Sep 3, 2012 (gmt 0)

you should first read the Delivery Context section of w3c's Mobile Web Best Practices 1.0:
http://www.w3.org/TR/mobile-bp/#d0e347

to keep googlebot happy (and most importantly to avoid looking like you are cloaking), you should probably read this from the webmaster blog, which should truthfully be titled "Making Websites Googlebot-Mobile Friendly".
Official Google Webmaster Central Blog: Making Websites Mobile Friendly:
http://googlewebmastercentral.blogspot.com/2011/02/making-websites-mobile-friendly.html [googlewebmastercentral.blogspot.com]

and more - Official Google Webmaster Central Blog: Recommendations for building smartphone-optimized websites:
http://googlewebmastercentral.blogspot.com/2012/06/recommendations-for-building-smartphone.html [googlewebmastercentral.blogspot.com]

and this which also discusses the difference between smartphones and feature phones...
Building Mobile-Optimized Websites - Webmasters - Google Developers:
http://developers.google.com/webmasters/smartphone-sites/ [developers.google.com]
(this is probably just a subset of the information linked in travelin_cat's post above)

this WebmasterWorld thread might have some useful discussion.
Mobile website design - HTML forum:
http://www.webmasterworld.com/html/4395640.htm [webmasterworld.com]

it looks like these days the best technical solution is one url, media queries, responsive design.
i think your implementation will depend on whether you care if google indexes your mobile content and how you are going to treat a googlebot visit vs a human visit.
assuming you want to avoid problems related to cloaking, duplicate content, and non-canonical urls...

mark_roach




msg:4490948
 1:33 pm on Sep 3, 2012 (gmt 0)

I will be doing this shortly and will probably use the following approach:

Use a cookie to save the users preference for mobile or full site.
The URLs will be the same and the html generated server side will differ dependent on the value in the cookie.
There will be a link on each page to flip the value of the cookie so you can easily swap from one version to the other.
If the cookie is not set run a one off piece of javascript to test for a small screensize and ask the visitor if they want to go to the mobile site, otherwise default to the full site.

cmendla




msg:4497008
 7:38 pm on Sep 18, 2012 (gmt 0)

I've used the jtouch extension on a couple of joomla sites. I had to fiddle with it a little to get the desktop version to show on desktops and the mobile version to show on mobiles.. however, it does a good job overall and is non-commercial

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved