Home Web Front-end JS Tutorial Summary of web page and browser compatibility issues (draft1)_javascript skills

Summary of web page and browser compatibility issues (draft1)_javascript skills

May 16, 2016 pm 06:52 PM
compatibility Browser Web page

1. Javascript
1. The getYear method of date object
The result returned by IE getYear() is the same as the result of getFullYear(), but ECMA262 clearly stipulates that getYear returns "year- 1970". Some websites use getYear to return the year, which results in logical differences between relatively standardized browsers such as IE and FF.
2.DOM
1. Event model
2.document.elementFromPoint
This method of document is an IE extension and can return the element based on the client area coordinates of the viewport. DOM node. Safari also supports this method, but the coordinates represent the coordinates after the web page content is laid out (the coordinates are the coordinates of the client area of ​​the browser window). The difference between the two means that if you want to get the element node through the position of the mouse pointer, IE can directly return the element to the client area coordinates (clientX, clientY) of the event, but Safari needs to use scrollX and scrollY to return it. Both are reasonable in the sense of this interface. The meaning of this coordinate is not clearly defined in MSDN, but IE is simpler in terms of interface usage, while Safari requires coordinate conversion.
3.CSS
4.layout
5. Plug-in and ActiveX
As we all know, IE is compatible with third-party programs. It is ActiveX technology; while Firefox, Safari, Chrome, and Opera use NPAPI plug-in technology. In terms of interface level, the plug-in interface level of the two is lower (both are C function pointers). They use abstract interfaces and data types to encapsulate the interaction logic between the browser and third-party programs, but the browser and plug-in programs are tightly coupled; ActiveX shields the process and thread models and is a loosely coupled interaction method. This is why legal ActiveX will not crash IE in IE, but plug-ins with the same function may crash the browser. The difference in this feature is also one of the bigger differences in browser compatibility.
6. Others
1. The forum sets cookies based on the browser sub-version in UserAgent. This is not reasonable because UserAgent will change with the browser version, causing the original cookie to be effective. .
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to set the browser to start automatically when booting? How to automatically open the browser when Win11 is started? How to set the browser to start automatically when booting? How to automatically open the browser when Win11 is started? Jun 12, 2024 pm 07:58 PM

How to set the browser to start automatically when booting? How to automatically open the browser when Win11 is started?

Clear the Google Chrome registry and clean up the remaining residue from uninstalling Google Chrome Clear the Google Chrome registry and clean up the remaining residue from uninstalling Google Chrome Jun 19, 2024 am 11:09 AM

Clear the Google Chrome registry and clean up the remaining residue from uninstalling Google Chrome

Sesame Open Door Official Website Sesame Open Door App Latest Entering Website Sesame Open Door Official Website Sesame Open Door App Latest Entering Website Feb 28, 2025 am 11:18 AM

Sesame Open Door Official Website Sesame Open Door App Latest Entering Website

The latest version of Sesame Open Door Official Website Entrance gate.io Official Website Link Address Entrance The latest version of Sesame Open Door Official Website Entrance gate.io Official Website Link Address Entrance Feb 28, 2025 am 11:21 AM

The latest version of Sesame Open Door Official Website Entrance gate.io Official Website Link Address Entrance

Compatibility issues of PHP framework in different PHP versions Compatibility issues of PHP framework in different PHP versions Jun 02, 2024 am 09:34 AM

Compatibility issues of PHP framework in different PHP versions

gate.io sesame door download Chinese tutorial gate.io sesame door download Chinese tutorial Feb 28, 2025 am 10:54 AM

gate.io sesame door download Chinese tutorial

Sesame Open Door Exchange official website gate.io exchange official website entrance Sesame Open Door Exchange official website gate.io exchange official website entrance Feb 28, 2025 am 10:45 AM

Sesame Open Door Exchange official website gate.io exchange official website entrance

Best practices for resolving PHP function compatibility issues Best practices for resolving PHP function compatibility issues May 01, 2024 pm 02:42 PM

Best practices for resolving PHP function compatibility issues

See all articles