When the company is making demands, it must be compatible with lower version browsers, such as IE8, due to customer or market needs. How do you deal with compatibility issues in your daily work?
Let me talk about my current solution, and I also hope that everyone can come up with their own solutions.
Firefox
andChrome
themselves are not big problems, and they are more convenient to debug. The problems are generally not big, mainlyIE
.
Windows system
If you use a lower version of IE,win10
may not be supported. In addition, the built-in debugging tools are really anti-human to use. After all, they were produced several years ago. Sometimes it is better to usefiddler
to adjust the request.
The browser uses IE11 (the emulation option of the built-in developer tools can simulate IE7-11 browsers. Generally speaking, it is okay, because the developer tools are relatively new and it is more convenient to debug, but There will be some css and js problems that are inconsistent with the actual effect in simulation mode)
Use IETest. To be honest, I think this tool is really difficult to use. The debugging tool is as old as 1. It is okay to look at the style issues, but it is tiring to debug js errors and so on.
Linux-like system
For this IE, you may need to run a virtual machine, and then when you run the virtual machine, you encounter the same problem as the aboveWindow system
.
Shared Cloud Test
This one hasbowserstack
(supports local debugging, requires installing chrome plug-in), etc. This fee is a bit expensive, about 29$/month, and it seems to be for one person. It supports most browsers, but the speed is relatively slow, but it is still a decent solution.
Private Cloud Test
It seems that when I went to a lecture before, someone said that if it is a private cloud, the first is the speed, and the second is the better customization.
Currently, I personally hope to useprivate cloud testing
, but I don’t know if there is a better open source solution.
We welcome everyone’s opinions and let’s discuss them together, thank you everyone~
Personally, I think the above idea is wrong.After clarifying the compatibility requirements, these compatibility issues should be taken into consideration when developing. Instead of testing, discovering, debugging and solving these problems after everything is done normally.
If it is determined that it needs to be compatible with IE8, then you should deal with some common problems during development. For example:
There is no JOSN under the window object of IE8, so you need to use the JSON library.
Under IE8, many cases will not be redrawn and need to be handled separately.
Compatible writing method for event binding under IE8.
IE89 does not have a console object when the console is not open, so console debugging code cannot exist in the final code.
IE8 basically does not support css3, and IE9 only partially supports some style downgrade solutions.
. . .
Clear compatibility requirements before development, and handle corresponding compatibility issues during development. After the final product is completed, just perform a functional test on the corresponding browser normally. There are basically no issues with compatibility.
The products of the company I work for must be fully compatible with IE8, and some must be compatible with IE7. I have always used this method. For some effects that cannot be achieved, directly communicate with customers to tell them that lower version browsers only guarantee functions and style compatibility, and cannot achieve the same effects as higher version browsers.
No matter what testing tool, problems must be solved eventually after they are discovered. Shouldn’t the best way to deal with them be to deal with them from the source? As you said, with lower versions of IE, debugging is either impossible or anti-human.
For tools, I recommend one:Alibaba’s F2ETEST. It is more troublesome to deploy, but it has good functions and is easy to use.
Finally, if the company has accumulated some experience, you will find that it is not just IE that needs to be compatible. Chrome and Firefox also have some problems, but there are relatively few.