Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-25-2015, 07:07 AM   #1
czarina
Webmaster Extraordinaire
 
czarina's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: A beautiful beach...
Posts: 10,745
"Go to Desktop Site" loop redirects to mobile site

Hi guys.
I was wondering if anyone here has a solution to this:

Salesforce1*Platform: Trusted Application Development Platform - Salesforce.com has a redirect to mobile site Salesforce1*Platform: Trusted Application Development Platform - Salesforce.com, which works fine.
On Salesforce1*Platform: Trusted Application Development Platform - Salesforce.com, there is a link to "Go to Desktop Site", which when clicked from a phone, TRIES to take you to the desktop site, but obviously encounters the redirect, and shoots you right back to the mobile site.

The only solution I can come up with is creating a second desktop tour which does not have the redirect. But this would mean a lot of work, since this is a template-driven site and in a nutshell, with this specific site, it'd be quite a lot of work.

Anyone has a different, simpler solution?
czarina is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-25-2015, 07:31 AM   #2
Harmon
( ͡ʘ╭͜ʖ╮͡ʘ)
 
Harmon's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 20,005
Do you have your code setup to automatically redirect for mobile? Remove that code and have a link to either the mobile version or the desktop version for the end user and let them choose.
__________________
[email protected]
Harmon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-25-2015, 07:36 AM   #3
czarina
Webmaster Extraordinaire
 
czarina's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: A beautiful beach...
Posts: 10,745
hi Harmon. My client wants the automatic redirect to mobile, so that wouldn't be an option
czarina is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-25-2015, 07:48 AM   #4
Harmon
( ͡ʘ╭͜ʖ╮͡ʘ)
 
Harmon's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 20,005
This could probably be done with javascript and cookies by setting them for say an hour which would in turn bypass the redirect for that hour and then when they come back later they would be redirected to mobile again. Maybe I am talking out of my ass here...
__________________
[email protected]
Harmon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-25-2015, 08:06 AM   #5
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
when user clicks the "Desktop site" from mobile version site,[ set cookie for them, something like
force_site_mode = desktop]


and

check for cookie before , [your redirect code is placed on desktop version site] to redirect users to the mobile version.

i.e.
if cookie is found && force_site_mode = desktop
dont redirect him to mobile version, even if its mobile i.e. dont exucute the modile redirect loop/code

else
check if its mobile and then execute redirect code.

its very easy........

now i would be thanks ful if you hit the thanks button.
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-25-2015, 08:09 AM   #6
Harmon
( ͡ʘ╭͜ʖ╮͡ʘ)
 
Harmon's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 20,005
Check this out: javascript - mobile site redirect with full site link - Stack Overflow

I think dude above nailed it.
__________________
[email protected]
Harmon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-25-2015, 11:18 AM   #7
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
improvement.

check if user is on desktop version of site and is accessing from mobile.
i,e, he is set with cookie force_site_mode = desktop

now for this user show link to go back to mobile version of your site.(to undo this effect)
and when he clicks on that link , remove the previously set cookie.


so in this way , if user goes to desktop version of site from mobile, he can go back to being normal and doesnt have to stick with desktop version of site every-time he visits your site.

now please click the thanks button already.
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
site, desktop, redirect, mobile, solution, lot, www.site.com/mobile, simpler, tour, creating, nutshell, template-driven, specific, www.site.com/destop, fine, wondering, loop, redirects, guys, encounters, shoots, phone, link, clicked



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.