I use Javascript to detect that someone is accessing my web site from a mobile device. This has worked fine until Apple upgraded their OS on their iPad from IOS 13.1 to iPadOS 13.1.
I use the code
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) )
{
// alert('This is a mobile device');
}
This worked as navigator.userAgent on IOS 13.1 was
Mozilla/5.0 (iPad; CPU OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1
Now, with iPadOS 13.1 it is
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15
which is the same as using an Apple Mac.
I could check the screen size but with all the different types of mobile devices this is not fool-proof.
Any suggestions how to resolve please?