Cross Browser Compatibility issue is one of the important issues we are facing in the web application. What is Cross Browser issue?
Few years ago, there were not so many browsers for internet users to see websites. But now a days, there are multiple browsers online available. Users in internet have many browser options. Means they can open web applications in several web browsers like Chrome, Internet Explorer, Mozilla Firefox, Safari, Opera etc.
These availability of browsers make the web applications more complex. These options creates difficulty for web designers and web developers, and no doubt they are responsible that their websites should compatible with any browser.
So what are the things can be used to fix compatibility issues. Here we discuss now:
Table of Contents
Use CSS Reset
Every browser has its own internal behaviour and due to this browsers renders page differently if our CSS style does not override its internal behaviour. Therefore we use CSS Reset to make our CSS base in all browsers would same.
Validate HTML & CSS
Validate HTML & CSS from W3Schools validators. If once we validate our HTML & CSS from w3Schools, It will show whether your website has incorrectly coded like missing tags or not.
Test Website Using Different Browsers
Old browsers does not support modern features and this is a common problem. Its more harder when we want to support
mostly browsers and using newer features for styling like flexbox, HTML 5 Video/Audio. Before finalize our code we should test our site in all common browsers.
Vendor prefixes / Webkits
This feature started in CSS3 and very helpful for web developers / web designers. We can do anything with this feature which impossible a few years ago. for example -webkit-border-radius will be replaced by the standard border-radius. It saves a lot of time and just write the same property many times. The CSS browser prefixes that we can use are:
- Google Chrome: -webkit-
- Safari: -webkit-
- Firefox: -moz-
- Opera: -o-
- Internet Expolrer: -ms-
- Microsoft Edge: -ms-
Using a CSS style property, Add the prefixes for each browser with the standard CSS property. This demands the prefixes versions would always first and normal CSS property would come last. For example we want to use CSS3 transition property, its order like:
-webkit-transition: all 4s ease;
-moz-transition: all 4s ease;
-ms-transition: all 4s ease;
-o-transition: all 4s ease;
transition: all 4s ease;