Codebehind Mobile Device Check
Your Device:
CCBot/2.0 (https://commoncrawl.org/faq/)
Mobile Device:
False
public static bool IsMobileUser()
{
string UserDevice = HttpContext.Current.Request.ServerVariables["HTTP_USER_AGENT"];
//Due to length I removed the devices from the regex for the displayed code snippet.
Regex MobileDevices = new Regex(, RegexOptions.IgnoreCase);
Regex OtherDevices = new Regex(, RegexOptions.IgnoreCase);
if (MobileDevices.IsMatch(UserDevice) || OtherDevices.IsMatch(UserDevice.Substring(0, 4)))
return true;
else
return false;
}