homepage Welcome to WebmasterWorld Guest from 54.167.173.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
Mobile back to desktop?
How are you handling this?
Play_Bach




msg:4471166
 4:42 am on Jun 30, 2012 (gmt 0)

My mobile version is finally live, yay. For those of you running desktop versions that redirect to the mobile site, do you offer a "switch back to desktop" link? If so, how are you doing this to avoid the loop back to mobile? I've read a bunch of 'how tos' and my mind is creamed corn. Thanks.

 

rajivatre




msg:4471263
 12:59 pm on Jun 30, 2012 (gmt 0)

Hi,
IMO you can give a small query string parameter along with url when you are giving link from mobile site back to desktop version.
for eg. www.gotodesktop.com?stepback=1
Check for querystring "stepback" in your desktop version site and if it is present then dont call your function to detect mobile browser.

Hope this would help.

Thanks
Rajiv

jackonaplane




msg:4471267
 1:13 pm on Jun 30, 2012 (gmt 0)

Like rajivatre's solution, my link back to the desktop site has a value in the query string that prevents the forwarding. However I also take this one step further by setting a cookie called "forceMainSite" which when found in future pageviews, also stops the mobile checking function from running.

scotland




msg:4471268
 1:18 pm on Jun 30, 2012 (gmt 0)

Play_Bach
I decided to create a mobile to desktop design instead of having in effect having two sites - I based it on [cssgrid.net...] and changed the css slightly so that it works for me on a Smartphone, a 7 inch tablet and a 22 inch monitor. I did try the twitter bootrap and found it too difficult to follow at this point [twitter.github.com...]
I know this does not answer your question, it is just a different way of approaching the mobile to desktop issue.

rajivatre




msg:4471269
 1:35 pm on Jun 30, 2012 (gmt 0)

@scotland: I checked out the link you had given and also downloaded files provided over there. Its really nice script.

Not intend to hijack this thread but I have a small doubt, how you adjust big images in case of fluid layout?

I mean if you have a banner of size 468X60 on desktop site how that will get adjusted on smartphone or tablet?

Or do you simply remove that banner from display based on screen resolution?

Isnt it becomes too complicated to manage complicated design with this type of approach?

Thanks
Rajiv

rajivatre




msg:4471270
 1:39 pm on Jun 30, 2012 (gmt 0)

Ohh Sorry I got my answer on the same link.
Not read below initially.

Thanks
Rajiv

Play_Bach




msg:4471277
 2:04 pm on Jun 30, 2012 (gmt 0)

Thanks all! The idea of checking the referring string for a specific character group was something that I was considering yesterday. The problem is how to check for it and then overide the mobile redirect in htaccess. Rajiv and jackonaplane, are you using htaccess?

I also spent a fair amount of time looking at Responsive Design, but I don't see how there's a way to turn it off should a viewer want the full site. Is there? Sometimes a user may want features only available on the desktop version. For example, a few years ago the PayPal mobile site did not offer a "Withdraw" option. Only way to get my money on my iPhone then was to go to their desktop site and pinch and zoom my way to the withdraw link.

So I like the idea of a dedicated mobile site in tandem with the desktop, but RD also makes sense. I just haven't figured out to do either yet! ;-)

jackonaplane




msg:4471278
 2:09 pm on Jun 30, 2012 (gmt 0)

I'm not using htaccess as I don't believe cookie values can be used at that level (if I'm wrong, that's great news as I think htaccess would be a cleaner solution).

My sites use PHP and I have a function that checks the user agent for strings that occur in common mobile browsers. If it finds one (and the forceMainSite cookie is not set), it does a 301 redirect to the mobile version of the page.

netmeg




msg:4471281
 2:21 pm on Jun 30, 2012 (gmt 0)

Responsive design isn't "turned off" - it usually IS the same site, it's just arranged differently.

Play_Bach




msg:4471282
 2:28 pm on Jun 30, 2012 (gmt 0)

Thanks netmeg, by "arranged" do you mean your desktop and mobile views have the same navigation options? Maybe I'm misunderstanding, or can your users choose which style sheet they want?

Leosghost




msg:4471289
 3:00 pm on Jun 30, 2012 (gmt 0)

Usually the response to the "media query" and or "viewport query" will invoke different parts of the style sheet or invoke different style sheets..visitors just see the fluid results..

Play_Bach




msg:4471290
 3:10 pm on Jun 30, 2012 (gmt 0)

Thanks Leosghost. Is there a way for the user in RD, say on an iPhone, to overide the viewport and pick the desktop style sheet or are they stuck with the iPhone layout?

netmeg




msg:4471331
 7:04 pm on Jun 30, 2012 (gmt 0)

They're usually using the iphone layout, and that's usually better. I'm an advocate of user choice, but if the same information is available either way, I got no problem saying desktop is for desktop and iphone is for iphone.

nomis5




msg:4471336
 7:32 pm on Jun 30, 2012 (gmt 0)

I have two separate sites. If the user elects to go from mobile to the main site I drop a cookie that says they prefer the main site. The cookie is examined each time I attempt to redirect them back to the mobile site and no redirect occurs if the cookie indicates they prefer the main site.

Play_Bach




msg:4471487
 12:21 pm on Jul 1, 2012 (gmt 0)

Don't know about anybody else, but after pouring over my stats yesterday, I learned that my mobile traffic is 90% iPhone and iPod Touch! Given that's the case, I've decided not to offer the desktop switch back. For the redirect, I'm just using a user agent JavaScript for those two devices, all others get to use the mobile link.

HuskyPup




msg:4471755
 2:10 pm on Jul 2, 2012 (gmt 0)

I'm giving up with developing mobile-specific sites, my biggest monthly visitor is me testing them!

Honestly in my top navigation I have Mobile & Home buttons next to each other on my main B&M site and it averages 0.5% of uniques and I reckon most of those are bots! Seemingly pointless...for me.

@scotland

Thanks for that grid link, I like the look of that, will give it a go.

lucy24




msg:4471808
 4:53 pm on Jul 2, 2012 (gmt 0)

I'm not using htaccess as I don't believe cookie values can be used at that level (if I'm wrong, that's great news as I think htaccess would be a cleaner solution).

You wouldn't associate htaccess with cookies would you? But nobody told mod_rewrite [httpd.apache.org], because %{HTTP_COOKIE} is in fact one of the values you can check for. Don't quote me though; I've never personally tried it. I kinda think you can do it through mod_setenvif too, but can't find a reference.

Play_Bach




msg:4471890
 7:17 pm on Jul 2, 2012 (gmt 0)

After a little more sleuthing, I'm now using screen size instead of user agent for the redirects. Only a few lines of code and no need to have a mile long list of devices to maintain.

HuskyPup




msg:4471930
 8:39 pm on Jul 2, 2012 (gmt 0)

I'm now using screen size instead of user agent for the redirects.


You're re-directing on the basis of what screen size?

There is nothing I find more annoying than sites re-directing my 10" Android tablet to either a mobile site or state "This site is not optimised for mobile"...arghhh...have any of these developers EVER checked their sites on such products?

I'm not saying you do but think about it.

One of the downsides of Android!

Play_Bach




msg:4471937
 9:17 pm on Jul 2, 2012 (gmt 0)

HuskyPup, I'm doing <=650 (width)

lucy24




msg:4471969
 12:34 am on Jul 3, 2012 (gmt 0)

I'm now using screen size instead of user agent for the redirects.

Fine, as long as you don't start doing the opposite thing. "Woo hoo, this visitor has a 1600px monitor so let's send 'em straight to the super-sized version of the page and to ### with the fact that their preferred browser width is under 800px and they've still got a crick in their neck from watching last week's tennis match."

:)

Play_Bach




msg:4471973
 12:49 am on Jul 3, 2012 (gmt 0)

Hi Lucy, rest assured that's NOT what I'm going to do!

Leonard0




msg:4472178
 3:46 pm on Jul 3, 2012 (gmt 0)

There is nothing I find more annoying than sites re-directing my 10" Android tablet to either a mobile site or state "This site is not optimised for mobile".

Those sites have taken the User-Agent detection misstep - detecting only "Android" (tablets) instead of "Android...Mobile" (smartphones)
[googlewebmastercentral.blogspot.ca...]

FWIW Google now recommends Responsive Design
[developers.google.com...]

netmeg




msg:4472222
 5:36 pm on Jul 3, 2012 (gmt 0)

Strictly speaking, responsive design doesn't user User-Agent detection, only viewport.

My sites start out responsive, but for everything below an iPaid (768x1024) I switch to a different responsive theme, because I serve less content and serve different ads.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google AdSense
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