Codebehind Mobile Device Check
Your Device:
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
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;
}