search
HomeWeb Front-endJS TutorialInternet Explorer 11 Browser Introduction: Don't call me IE

This article mainly introduces the Internet Explorer 11 browser introduction: Don’t call me IE, friends in need can refer to it.

Last week, Microsoft officially launched the first preview version of Internet Explorer 11 with Windows 8.1. With that, it’s time to put the various rumors about leaked versions of this controversial web browser to rest. We now know some important details about Internet Explorer 11, including support for WebGL, prefetch, prerender, flexbox, mutation observers and other web standards, perhaps more interestingly in IE11, is that it's not IE.

For the first time in a long time, Microsoft has removed some features from the Internet Explorer browser. The user-agent string has also changed. It seems that Microsoft has abandoned its own approach, so that the existing code branch that detects IE will return false in the Internet Explorer 11 browser, whether in javascript or on the server.

User-agent changes

Compared with previous versions, Internet Explorer 11’s user-agent string is shorter, and there are some interesting changes:

Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko

For the user-agent string of Internet Explorer 10 on Windows 7

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)

The most obvious difference is that, all the time The "MSIE" tag present in the Internet Explorer user-agent string has been removed. Also noticeable is the addition of "like Gecko" at the end of user-agent. This suggests that Internet Explorer would rather be identified as the Gecko browser than Internet Explorer itself. Safari was the first browser to add "like Gecko" so that anyone could sniff the "Gecko" characters in the user-agent string and allow the browser to pass.

Now any sniffing code looking for "MSIE" will not work under the new user-agent string. You can still search for "Trident" characters to make sure it's IE (the "Trident" logo was introduced with Internet Explorer). The true version of Internet Explorer is identified by "rv".

In addition, the information of the navigator object has also been changed, which further conceals the browser being used.

navigator.appName is set to "Netscape"
navigator.product is set to "Gecko"

This may look like a sneaky attempt to trick developers, but these are actually HTML5 specified. The navigator.product attribute must be "Gecko", and the navigator.appName should also be "Netscape" or more specific. But Internet Explorer 11 fails to follow this strange advice.

As a side effect of the change in navigator information, the browser detection based on Javascript logic in use may not be available, causing Internet Explorer 11 to be recognized as a Gecko-based browser.

document.all and his friends

Since IE4, document.all is omnipotent in IE browser. Similar to the previously implemented document.getElementById(), document.all is the IE method of getting a reference to a DOM element. Although from IE5 to IE10, document.all maintains support for the DOM. However, in 11, the legacy of this era has been set to return false, which means that any code branch judgment based on document.all will fail in IE11, even if the code actually uses document.all and works normally.

Another legacy is to add the attachEvent() of the event function, similar to the detachEvent() method. This method has been removed from IE11. These methods are removed to avoid some logical judgments, such as:

function addEvent(element, type, handler) {
    if (element.attachEvent) {
        element.attachEvent("on" + type, handler);
    } else if (element.addEventListener) {
        element.addEventListener(type, handler, false);
    }
}

Of course, we recommend that the best version for you to test is one that is always stable and meets standards. At some level, removing the attachEvent method won't cause any discomfort. However, the Internet is littered with poor feature detection logic code. The removal of the attachEvent method ensures that any code written in the above manner will use the standard version instead of the IE-specific method.

Some other removed features:

window.execScript() - the IE version of the eval() method

window.doScroll() - the IE version of the window Scroll method

script.onreadystatechange - Monitor the status change of the loaded script in IE

script.readyState - The status of script loading in IE

document.selection - IE The currently selected text in

document.createStyleSheet - Create a style sheet document in IE

style.styleSheet - A style object that references a style sheet in IE browser


All these IE browser ways have been replaced by standard features. After removing these features and methods, cross-browser code based on standard functional feature detection can still run normally without changes.

Conclusion

In a long time, IE11 may be the best IE browser. Microsoft is finally getting ready to undo the mistakes of the past and is starting to include a browser based on today's standards. Removing old features and modifying user agent strings that are not recognized by IE is a unique approach that ensures that all sites will continue to work. If the web application uses feature detection instead of browser sniffing, the code should run in IE11. For applications that use user-agent sniffing, users can still see a fully functional website because IE11 has excellent standards support.

A future without IE branch code is coming soon, let us look forward to it together.

(updated on 2013-7-2), the document.all mentioned in the revision was not actually deleted, but changed to falsy

The above is the entire content of this chapter. For more related tutorials, please Visit JavaScript Video Tutorial!

Statement
This article is reproduced at:human. If there is any infringement, please contact admin@php.cn delete
如何修复 Explorer.exe 高 CPU 使用率 Windows 11如何修复 Explorer.exe 高 CPU 使用率 Windows 11May 02, 2023 am 09:40 AM

与Windows11中Explorer.exe高CPU使用率的问题不同,一台计算机可能会遇到高CPU使用率。这是完全正常的,只要它很少发生并且不会显着影响PC的性能。然而,当它反复出现时,这会成为一个问题。它可能会使系统升温,延迟加载时间,并可能在您处理重要任务时冻结。为什么我的电脑会遇到Explorer.exe高CPU使用率?通常,由于以下原因之一,计算机可能会遇到高CPU使用率:运行需要更高CPU要求的程序:视频编辑和游戏软件会触发高CPU使用率。如果在与发布

什么是公网ip什么是公网ipSep 27, 2021 am 10:30 AM

公网ip是指用公网连接Internet上的非保留地址,可以与Internet上的其他计算机随意互相访问。互联网上的每台计算机都有一个独立的IP地址,该IP地址唯一确定互联网上的一台计算机,这个IP地址就是指的公网IP地址。

win11无法上网的问题如何解决?处理win11电脑无法连接到internet的方法指南win11无法上网的问题如何解决?处理win11电脑无法连接到internet的方法指南Jan 29, 2024 pm 08:57 PM

我们在使用电脑的时候都会连接到网络,有了网络我们才能上网冲浪,近期也有不少的用户们在询问小编win11无法连接到internet怎么解决?用户们可以直接的打开系统给出的最佳匹配服务应用来进行设置,下面就让本站来为用户们来仔细的介绍一下win11电脑无法访问internet的解决方法吧。win11电脑无法访问internet的解决方法方法一:可以按下Win+S组合键,或者点击底部任务栏旁边的搜索图标,打开Windows搜索窗口。在搜索框中输入"服务",然后点击打开系统给出的最佳匹配服务应用。方法二

Internet Explorer 打开 Edge:如何停止 MS Edge 重定向Internet Explorer 打开 Edge:如何停止 MS Edge 重定向Apr 14, 2023 pm 06:13 PM

长期以来,InternetExplorer的失宠一直不是秘密,但随着Windows11的到来,现实开始了。Edge将来不再有时取代IE,它现在是微软最新操作系统中的默认浏览器。目前,您仍然可以在Windows11中启用InternetExplorer。但是,IE11(最新版本)已经有了一个正式的退役日期,即2022年6月15日,时间在流逝。考虑到这一点,您可能已经注意到InternetExplorer有时会打开Edge,而您可能不喜欢它。那么为什么会这样呢?在

internet的通信协议是什么?internet的通信协议是什么?Dec 24, 2020 pm 02:53 PM

Internet采用的主要通信协议是“TCP/IP协议”,TCP/IP传输协议,即传输控制/网络协议,也叫作网络通讯协议;它是在网络的使用中的最基本的通信协议,TCP/IP传输协议对互联网中各部分进行通信的标准和方法进行了规定。

如何在没有 Internet 连接的情况下设置 Windows 11如何在没有 Internet 连接的情况下设置 Windows 11Apr 15, 2023 am 10:46 AM

从内部版本22557及更高版本开始,Windows11需要Internet连接才能完成首次设置,也称为家庭版和专业版的开箱即用体验(OOBE),尽管有一种方法可以绕过此要求完全。由于微软希望用户将他们的计算机连接到他们的微软帐户,该公司正在对最初的Windows11设置进行更改,这将使得几乎不可能在没有Internet连接的情况下继续执行全新安装。或者,如果设置检测到设备没有网络连接,您将被发送到糟糕,您丢失了互联网连接屏幕。如果您单击重试选项,您将看到再次连接到Internet

微软希望通过将功能与 explorer.exe 解耦来提高 Windows 11 的运行速度微软希望通过将功能与 explorer.exe 解耦来提高 Windows 11 的运行速度May 06, 2023 am 08:40 AM

Windows任务管理器如果您是Windows的长期用户,您就会知道操作系统中的多个进程或功能都与文件资源管理器相关联。虽然explorer.exe应该只与文件管理相关联,但它也与Windows体验的其他部分相关联,例如任务栏,这对性能来说并不是一件好事。Microsoft一直在采取措施将任务栏、通知中心等功能与文件资源管理器(explorer.exe)分离。桌面和explorer.exe之间的集成是操作系统的瓶颈之一,因为繁重的资源密集型文件操作可能会使任务栏等不相关的

如何删除临时Internet文件如何删除临时Internet文件Dec 06, 2023 am 10:56 AM

删除临时Internet文件步骤:1、按下win+r打开“运行”,在运行对话框中输入:%temp%命令,点击确定或者回车,打开用户帐户临时文件夹;2、打开Temp文件夹后按下Ctrl+A键,选中全部临时文件,右键点击,在右键菜单中点击“删除”;3、若出现个别无法删除的临时文件重启电脑即可删除。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools