


Summary of web page and browser compatibility issues (draft1)_javascript skills
May 16, 2016 pm 06:52 PM1. 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. .

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

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

Compatibility issues of PHP framework in different PHP versions

gate.io sesame door download Chinese tutorial

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

Best practices for resolving PHP function compatibility issues
