관리 메뉴

심재운 블로그

javascript 로 ie 브라우저 버전 확인하기 본문

프로그래밍/JavaScript

javascript 로 ie 브라우저 버전 확인하기

재우니 2014. 12. 31. 12:40

 

 

Such objects for versions of IE up to 10 inclusive are listed in the following table.

 

IE versions Supported standard object
10+ window.atob
9+ document.addEventListener
8+ document.querySelector
7+ window.XMLHttpRequest
6+ document.compatMode

By checking existence of these objects and combining such checks when needed, it is possible to reliably filter a specific IE version or a range of IE versions up to 10 inclusive.

This technique works reliably including cases when code minification is used.

The following table contains ready-to-use conditions.

IE versions Condition to check for
10 or older document.all
9 or older document.all && !window.atob
8 or older document.all && !document.addEventListener
7 or older document.all && !document.querySelector
6 or older document.all && !window.XMLHttpRequest
5.x document.all && !document.compatMode

 

 

 

0 Comments
댓글쓰기 폼