![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Webmaster Extraordinaire
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
( ͡ʘ╭͜ʖ╮͡ʘ)
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Webmaster Extraordinaire
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
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
( ͡ʘ╭͜ʖ╮͡ʘ)
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...
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
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.
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
( ͡ʘ╭͜ʖ╮͡ʘ)
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. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
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.
__________________
SSD Cloud Server, VPS Server, Simple Cloud Hosting | DigitalOcean
|
![]() |
![]() ![]() ![]() ![]() ![]() |