카테고리 없음
navigator.userAgent IOS13 이상에서 태블릿,휴대폰 확인하는방법.
신입같은 3년차
2020. 2. 18. 17:52
728x90
iPad와 다른 태블릿으로 개발을 하던 도중 태블릿인지 아닌지에 대한 로직을 추가하고있었습니다.
그런데 navigator.userAgent.indexOf("iPad") > -1 실행을 하니 false가 나오면서 userAgent string에 없다고 나오길래 확인해본 ㅣ
IOS13이상 부터는 패드로 접근하면 데스크탑모드로 리다이렉션을 시킨다고 합니다 .
찾아본결과 다음 사이트에서 정보를 얻어 이렇게 글을 남깁니다.
https://github.com/lancedikson/bowser/issues/329
iPadOS Safari 13 is detected as Safari 13 on MacOS 10.15 · Issue #329 · lancedikson/bowser
window.navigator.userAgent of the browser is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 And it's detected like Safari 1...
github.com
728x90
반응형