Browser introdu...LOGIN

Browser introduction

Since the emergence of JavaScript is to run in browsers, browsers are naturally what JavaScript developers must pay attention to.

The current mainstream browsers are divided into the following categories:

IE 6~11: The most commonly used IE browser in China has historically had poor support for W3C standards. Starting from IE10, the ES6 standard is supported;

Chrome: a Webkit-based browser produced by Google, with a built-in very powerful JavaScript engine - V8. Since Chrome will always upgrade itself once installed, you don’t have to worry about its version. The latest version has already supported ES6;

Safari: Apple’s Mac system’s own browser based on the Webkit kernel, starting from OS X The 6.1 version that comes with 10.7 Lion starts to support ES6. The latest version of Safari that comes with OS X 10.11 El Capitan is 9.x, which already supports ES6;

Firefox: Gecko kernel and JavaScript engine developed by Mozilla OdinMonkey. In the early days, Firefox was released according to versions. Later, it finally smartly learned from Chrome's practice and upgraded itself to keep up to date;

Currently on mobile devices, the two camps of iOS and Android mainly use Apple's Safari and Google's Chrome respectively. Since both are at the core of Webkit, HTML5 was first fully popularized on mobile phones (Microsoft was definitely behind on the desktop), and standard support for JavaScript is also very good, with the latest versions supporting ES6.

Other browsers such as Opera are automatically ignored due to their small market share.

In addition, we must also pay attention to identifying various domestic browsers, such as XX Safe Browser and XX Tornado Browser. They just make a shell, and their core calls IE. Some also claim to support both IE and Webkit's "dual-core" browser.

The main difference in JavaScript support between different browsers is that some API interfaces are different, such as AJAX and File interfaces. For the ES6 standard, different browsers have different support for each feature.

When writing JavaScript, you must fully consider the differences in browsers and try to make the same JavaScript code run in different browsers.


Next Section
<html> <head> <script> alert('Hello, world'); </script> </head> <body> </body> </html>
submitReset Code
ChapterCourseware