OS 별, 브라우져 별 업데이트 내용입니다.
크로스 브라우징을 위해 MSIE 6 을 좆다가 보니 호환성 모드를 고려해야 할 때가 있더군요.
방문객의 상태가 어떠냐에 따라 구 버젼의 브라우져에 대응 할 수 있겠죠..
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
과 같이 호환모드를 강제하기 위해서 실제 얼마나 많은 접속자가 오는지 확인해 볼 필요가 있습니다.
내친김에 윈도우 8, 8.1 의 구분도 추가하면 좋을 듯 합니다.
user.agent 값에 msie 6 이어도 실제 브라우져는 7 또는 8 일 수 있습니다. (호환모드)
이를 확인하는 값은 triednt 값입니다.
참고 : http://msdn.microsoft.com/library/ms537503.aspx
Trident 값은 MSIE 8 부터 나옵니다
수정할 내용은 다음과 같습니다.
lib/visit.lib.php
function get_brow($agent)
~~~~~~
else if(preg_match("/msie 6.0[0-9]*/", $agent)) {
if(preg_match("/trident\/4*/", $agent)) {
$s = "MSIE 6 8호환";
} else if(preg_match("/trident\/5*/", $agent)) {
$s = "MSIE 6 9호환";
} else if(preg_match("/trident\/6*/", $agent)) {
$s = "MSIE 6 10호환";
} else if(preg_match("/trident\/7*/", $agent)) {
$s = "MSIE 6 11호환";
} else {
$s = "MSIE 6";
}
}
else if(preg_match("/msie 7.0[0-9]*/", $agent)) {
if(preg_match("/trident\/4*/", $agent)) {
$s = "MSIE 7 8호환";
} else if(preg_match("/trident\/5*/", $agent)) {
$s = "MSIE 7 9호환";
} else if(preg_match("/trident\/6*/", $agent)) {
$s = "MSIE 7 10호환";
} else if(preg_match("/trident\/7*/", $agent)) {
$s = "MSIE 7 11호환";
} else {
$s = "MSIE 7";
}
}
else if(preg_match("/msie 8.0[0-9]*/", $agent)) { $s = "MSIE 8.0"; }
else if(preg_match("/msie 9.0[0-9]*/", $agent)) { $s = "MSIE 9"; }
else if(preg_match("/msie 10.0[0-9]*/", $agent)) { $s = "MSIE 10"; }
else if(preg_match("/msie 11.0[0-9]*/", $agent)) { $s = "MSIE 11"; }
~~~~~~
function get_os($agent)
~~~~
else if(preg_match("/windows nt 6\.1/", $agent)) { $s = "Windows7"; }
else if(preg_match("/windows nt 6\.2/", $agent)) { $s = "Windows 8"; }
else if(preg_match("/windows nt 6\.3/", $agent)) { $s = "Windows 8.1"; }
else if(preg_match("/windows 9x/", $agent)) { $s = "ME"; }
~~~~
관리자님 업데이트 부탁요~~
=======================
추가.. ie 6 (7도...)을 MS가 버렸음에도 아직 10% 가까이 나타납니다.
무시할 수 만은 없는 수치네요...
크로스 브라우징을 위해 MSIE 6 을 좆다가 보니 호환성 모드를 고려해야 할 때가 있더군요.
방문객의 상태가 어떠냐에 따라 구 버젼의 브라우져에 대응 할 수 있겠죠..
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
과 같이 호환모드를 강제하기 위해서 실제 얼마나 많은 접속자가 오는지 확인해 볼 필요가 있습니다.
내친김에 윈도우 8, 8.1 의 구분도 추가하면 좋을 듯 합니다.
user.agent 값에 msie 6 이어도 실제 브라우져는 7 또는 8 일 수 있습니다. (호환모드)
이를 확인하는 값은 triednt 값입니다.
참고 : http://msdn.microsoft.com/library/ms537503.aspx
Trident 값은 MSIE 8 부터 나옵니다
수정할 내용은 다음과 같습니다.
lib/visit.lib.php
function get_brow($agent)
~~~~~~
else if(preg_match("/msie 6.0[0-9]*/", $agent)) {
if(preg_match("/trident\/4*/", $agent)) {
$s = "MSIE 6 8호환";
} else if(preg_match("/trident\/5*/", $agent)) {
$s = "MSIE 6 9호환";
} else if(preg_match("/trident\/6*/", $agent)) {
$s = "MSIE 6 10호환";
} else if(preg_match("/trident\/7*/", $agent)) {
$s = "MSIE 6 11호환";
} else {
$s = "MSIE 6";
}
}
else if(preg_match("/msie 7.0[0-9]*/", $agent)) {
if(preg_match("/trident\/4*/", $agent)) {
$s = "MSIE 7 8호환";
} else if(preg_match("/trident\/5*/", $agent)) {
$s = "MSIE 7 9호환";
} else if(preg_match("/trident\/6*/", $agent)) {
$s = "MSIE 7 10호환";
} else if(preg_match("/trident\/7*/", $agent)) {
$s = "MSIE 7 11호환";
} else {
$s = "MSIE 7";
}
}
else if(preg_match("/msie 8.0[0-9]*/", $agent)) { $s = "MSIE 8.0"; }
else if(preg_match("/msie 9.0[0-9]*/", $agent)) { $s = "MSIE 9"; }
else if(preg_match("/msie 10.0[0-9]*/", $agent)) { $s = "MSIE 10"; }
else if(preg_match("/msie 11.0[0-9]*/", $agent)) { $s = "MSIE 11"; }
~~~~~~
function get_os($agent)
~~~~
else if(preg_match("/windows nt 6\.1/", $agent)) { $s = "Windows7"; }
else if(preg_match("/windows nt 6\.2/", $agent)) { $s = "Windows 8"; }
else if(preg_match("/windows nt 6\.3/", $agent)) { $s = "Windows 8.1"; }
else if(preg_match("/windows 9x/", $agent)) { $s = "ME"; }
~~~~
관리자님 업데이트 부탁요~~
=======================
추가.. ie 6 (7도...)을 MS가 버렸음에도 아직 10% 가까이 나타납니다.
무시할 수 만은 없는 수치네요...
댓글 5개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1216 | |
| 1202 | |
| 1197 | |
| 1191 | |
| 1189 | |
| 1187 | |
| 1178 | |
| 1175 | |
| 1168 | |
| 1164 | |
| 1160 | |
| 1157 | |
| 1155 | |
| 1152 | |
| 1147 | |
| 1144 | |
| 1143 | |
| 1140 | |
| 1134 | |
| 1130 | |
| 1128 | |
| 1124 | |
| 1123 | |
| 1115 | |
| 1111 | |
| 1108 | |
| 1097 | |
| 1091 | |
| 1088 | |
| 1086 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기