问题
I am able to detect iPadAir2 device running on iOS 11.4 using Request.Browser.IsMobileDevice and it gives me UserAgent information saying its an iPad:
When I do same for iPadAir2 running on iOS 13.0.1 its not giving me iPad keyword anymore:
how do I detect its an ipad and ruuning a safari browser?
I need this to detect iPad in Razor .chtml page so I can show different Menu for my website.
I found this solution from here How to detect device name in Safari on iOS 13 while it doesn't show the correct user agent?
let isIOS = /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
How to use this variable in razor to change website menu ?
来源:https://stackoverflow.com/questions/58344491/request-browser-ismobiledevice-not-working-with-ipadair2-and-ios-13-0-1