Web page and browser compatibility issues summary (DRAFT1) _javascript tips

Source: Internet
Author: User
A. Javascript
1. GetYear Method of Date Object
The result of the return of IE getyear () is the same as the getfullyear () result, but ECMA262 explicitly stipulates that getyear returns "year-1970". And some sites using getyear return year, resulting in IE browser and FF and other more standard browsers appear logically different.
Two. DOM
1. Event model
2.document.elementfrompoint
This method of document is extended by IE, and the DOM node of the element can be returned based on the client area coordinates of the viewport. Safari also supports this method, but the coordinates represent the coordinates of the page's content layout (which is the client area coordinates of the browser window). The difference between the two is that if you want to get the element node through the mouse pointer position, IE is the client area coordinates (CLIENTX,CLIENTY) of the customer that can direct the event, but Safari needs to return with SCROLLX and scrolly. Both are reasonable from the point of view of the interface. The meaning of the coordinates is not clearly defined in MSDN, but IE is simpler to use from the interface, while Safari needs to transform the coordinates.
Three. CSS
Four. Layout
Five. Plugins and ActiveX
As we all know, IE compatible with Third-party programs using ActiveX technology, and Firefox,safari,chrome,opera is the use of NPAPI plug-in technology. Both at the interface level, the plug-in interface level is lower (all are C function pointers), abstract interfaces and data types encapsulate the interactive logic of browsers and Third-party programs, but browsers and plug-ins are tightly coupled, while ActiveX masks processes and threading models, and is a loosely coupled interactive approach. This is why legitimate ActiveX in IE does not cause IE to crash, but the same functional plug-ins may cause the browser to crash. The difference in this feature is also one of the big differences in browser compatibility.
Six. Other
1. It is not reasonable for the forum to set cookies according to the useragent of the browsers in the browser, because the useragent will change with the browser version, resulting in the original cookie effect.

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.