Check the compatibility of my app with browsers

Asked

Viewed 71 times

2

Generally speaking, 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 functionalities?

  • 1

    I use browserstack.com, it emulates several browsers, is very cool.

  • I used to, too, but when I use the localhost I have problems testing, actually, I’ve never been able to test using the localhost.

  • 1

    In localhost will not even, however, if you configure in the firewall the ports, router and such, you can access your IP, then it would be right to use this tool with your localhost.

  • 1

    That I didn’t know! Thank you very much!!!

1 answer

4


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

Where I work, at Atlassian, this is done through automated tests with Web Driver and different instances with supported browsers. Obviously not every version and sometimes regressions occur. It is impossible to check everything.

On top of that, a cool technique they implemented to prevent regressions in visual elements (which usually pass beaten) was to use screenshots during testing and compare with previous versions.

Additionally, it is important that developers know what they are using, especially when it comes to HTML, Javascript and CSS. This includes analyzing the compatibility of all 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 the HTTP headers sent by the browser the cookies do not expire as expected, JSON requests may not work well, file uploads may have different headers, etc.

Ultimately, supporting multiple browsers in their different versions means you’ll have to give up some more advanced features or maintain varying versions of these features. An example is to allow multiple uploads with drag & drop in modern browsers as you go back (fallback) for a simple field in older browsers.

Specifically for Javascript, avoid doing ifs for browser-specific versions, except in case you want to bypass a bug that is also specific. Try using 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 such as Modernizr. So instead of doing something like if (ie > 11) you will have, for example, if (suportaWebSockets).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.