Check the compatibility of my application with browsers

2

In general, how can I check the compatibility of my web application with the most used browsers (and their versions) so that there is no problem with the features?

    
asked by anonymous 07.12.2015 / 08:46

1 answer

4

The only way to ensure compatibility is by testing the application on all versions that you support.

Where I work, at Atlassian, this is done through automated testing with Web Driver and different instances with supported browsers. Obviously there is no version and regressions sometimes occur. It is impossible to verify everything.

On top of that, a cool technique they implemented to avoid regressions on visuals (which usually get hit) was to use screenshots during the tests and compare with previous versions.

In addition, it's important for developers to know what they're using, especially HTML, JavaScript, and CSS. This includes analyzing the compatibility of all the libraries, components, and frameworks used, in addition to the functionalities used. In this case, references such as Can I use and Mozilla Web references are quite useful.

The server side does not bring so much concern in this regard, but it still involves some care. Browsers have different behaviors in different contexts. For example, depending on HTTP headers sent by the browser, cookies do not expire as expected, JSON requests may not work well, file uploads may have different headers, etc.

At the end of the day, supporting multiple browsers in their different versions means that you'll have to give up some more advanced features or keep various versions of these features. One example is to allow multiple uploads with drag & drop in modern browsers as you fallback ) to a simple field in older browsers.

Specifically for JavaScript, avoid making if s for specific versions of browsers, unless you want to work around a bug that is also specific. Try to use a feature detection technique ( feature detection ). One way to do this without going into the specific details of each item is by using a library like Modernizr . So instead of doing something like if (ie > 11) you will have, for example, if (suportaWebSockets) .

    
07.12.2015 / 09:19