I have done this code and work well in ios mobile browser, but not work in desktop ios mobile browser mode (Toggle Device Toolbar in browser).
var isSafari = /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);
What I want is to validate if :
- iOS with Safari = true
- iOS in Desktop browser mode = false (I mean when we use Toggle Device Toolbar in the desktop browser)