관리 메뉴

엉망진창

브라우저 구분 - User Agent String 본문

Study_Web/Web Common

브라우저 구분 - User Agent String

엉망진창 2012. 3. 8. 10:20
User Agent 리스트 - http://useragentstring.com/pages/useragentstring.php
모든 브라우저의 User Agent 확인 - http://useragentstring.com/pages/All/

참조 : http://useragentstring.com
참조 : 스마트폰, 풀 브라우징폰의 User Agent명(브라우저명)은? 

아래는 자바스크립트 예제
    var uAgent = navigator.userAgent.toLowerCase();
    var mobilePhones = new Array('iphone', 'ipod', 'ipad', 'android', 'blackberry', 'windows ce','nokia', 'webos', 'opera mini', 'sonyericsson', 'opera mobi', 'iemobile');

 
    for (var i = 0; i < mobilePhones.length; i++)
         if (uAgent.indexOf(mobilePhones[i]) != -1)
            document.location = "접속할 사이트 주소";