Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

How to detect if HTML page is open on browser mobile or browser mobile mode in desktop?

$
0
0

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 :

  1. iOS with Safari = true
  2. iOS in Desktop browser mode = false (I mean when we use Toggle Device Toolbar in the desktop browser)

Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>