About IE11 Modify User-agent no longer support document.all and other _ related skills

Source: Internet
Author: User

A new identity
The first news about IE11 is that it has a new user agent (UA) string:


mozilla/5.0 (IE 11.0; Windows NT 6.3; trident/7.0;. net4.0e;. net4.0c; rv:11.0) Like Gecko

IE11 Remove "MSIE", resulting in the previous JS detection "MSIE" code can not be used.

Navigator.appname is set to "Netscape"

Navigator.product is set to "Gecko"

document.all has been set to false in IE11, if you want to judge whether IE browser can refer to this article

Http://www.jb51.net/article/76296.htm

function Isie () {//ie?
  if (!! Window. ActiveXObject | | ' ActiveXObject ' in Window ' return
   true;
   else return
   false;
 

Attachevent was also removed from the

Some other features that have been removed:

IE version of the Window.execscript ()--eval () method

Scrolling method of Window.doscroll ()--ie window

State change for listening to load scripts in Script.onreadystatechange--ie

State of script loading in Script.readystate--ie

The text currently selected in Document.selection--ie

Copy Code code as follows:

Modified to a more standard
Document.getselection ()
Equivalent to Document.selection.createRange (). Text:

Create style sheet in Document.createstylesheet--ie

Style.stylesheet--ie a Style object referencing a style sheet in the browser

User-agent string Change

For many traditional Web sites, some of the most obvious updates for IE11 involve user-agent strings. The following are the contents of the IE11 report on Windows 8.1:

mozilla/5.0 (Windows NT 6.3; trident/7.0; rv:11.0) Like Gecko

This article is for the time being to introduce so many more, please continue with the other relevant articles about the cloud-dwelling community.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.