0

I'm using Request.Browser.IsMobileDevice to detect if my site is being visited by a mobile or desktop. However we want to a text at the bottom of mobile pages to say something like "Do you prefer to see the desktop site, click here" and then it should refresh the site and show the desktop site, so with other words ignore all my if statements with Request.Browser.IsMobileDevice.

How should I approach this? With sessions?

fyi, I am using Umbraco CMS.

Mik3NL
  • 397
  • 2
  • 21
  • 1
    Do it however you want. IP settings, cookies or user settings. Though I would recommend cookies. – Vanna Jan 16 '18 at 08:20
  • FYI - `Request.Browser.IsMobileDevice` depends on `.browser` files...in order for it to be reliable, you will need to [keep them up to date](https://stackoverflow.com/q/1829089/). – NightOwl888 Jan 16 '18 at 08:20
  • Doesn't look like it's supported anymore. However it seems to work fine when I test it on phones. – Mik3NL Jan 16 '18 at 08:22

0 Answers0