USERAGENTDATA

Category
아이템: U(69)
포스트 갯수1

[Javascript] Mobile 모바일 접속 체크 (check mobile access)(prepare userAgent freezing by using client hint)

1. navigator.platform 값으로 비교. 해당 값에 접속한 OS 정보가 담겨져 있음(정확히는 브라우저가 컴파일 된 플랫폼 정보가 담겨져 있음)접속 구분하려는 값을 특정 한 후, 해당 값들이 navigator.platform에 있는지 indexOf 처리함(아래에서 win16, win32, win64는 bit별 윈도우, mac, macintel 은 맥OS 값) ex) function isMobile(){ return "win16|win32|win64|mac|macintel".indexOf(navigator.platform.toLocaleLowerCase()) <0;} Using "navigator.platform". "navigator.platform" is showing abo