Mobile Cookie

How can I make a button on my site that will let people view the desktop version from their mobile device? I have tried setting a cookie with PHP and that doesnt seem to be working.

Thanks in advance.

That’s not a Cloudflare-configurable feature. I suggest you head over to StackOverflow.com and see if anybody has already posted such a question.

What I did in this situation is made a new sub domain ‘d.mydomain.com’ that is a DNS only domain (grey cloud). I then put a link on my mobile site that directs users to that subdomain (that ultimately just points to my main site). Cloudflare mobile redirect only works on proxied domains. Problem solved. Obviously this creates the issue of revealing my origin (which im not worried about I know that my origin host has world class DDOS protection, I’m only here for content delivery and speed), and reducing speed for users that wish to take this route. The stupid part of all of this is that you can literally just hit the ‘view desktop site’ button in your mobile browser and get the same effect without this vulnerability but Its not my site and thats the way the client wants it so screw it. The customer is always right…

Should also note that there is a way to do this correctlyvia cloudflare that wont expose origin and stuff, but I couldnt be bothered to mess with it. I was getting a fair amount of errors from my host when attempting.

This topic was automatically closed after 14 days. New replies are no longer allowed.