Question

I have a DNN site that redirects to a mobile version of the site. I am trying to set a cookie or a session so that when directing off from the mobile version (to desktop version) it wont just loop back to the mobile website every time. What file should I be looking in to find where the redirect call is? (and to add a check or statement to see if came from mobile site already).

Thanks!

Was it helpful?

Solution

All you need to do is set a querystring parameter on the redirect to the desktop site of nomo=1. This will set 2 cookies, one of which is "disableredirectpresist" which expires after 20mins. If the user stays on the desktop site, this cookie is refreshed by 20mins to keep user on desktop site.

So if you have a link on the desktop site that redirects back to mobile, you would want to delete this cookie from your code behind (can't delete from javascript as its a http cookie).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top