2
5 Comments

Front end question

what's the best way to ensure your front end is working for 99% of users?

on June 18, 2019
  1. 2

    The best way is to use CSS preprocessors like Stylus or Sass and for the JavaScript par use compilers like Babel. With these tools, you'll get 99% coverage on the most used browsers.

    Don't try to do it yourself, it'll be a waste of time.

  2. 1

    Instead of saying "99% of users" I would say I want to support the last X versions of these browsers. You can see browser stats here - https://www.w3counter.com/globalstats.php. The question you have to ask is what are the browsers you want to support. As has been said you can either A) check out caniuse and roll/test the features yourself or B) use a compiler like babel and use babel-env to determine browser support, add required polyfills for JS, and use a css preprocessor to take care of styles, OR use a CSS in JS library like emotion

  3. 1
    1. You can check your features against https://caniuse.com/
    2. You can assemble volunteers to look at your site/app with their myriad devices and pay them with beer/cupcakes for screenshots of weird stuff. This paid off for me a lot in the past
    3. Save your old phones/tablets. Curse when one of them shows you a surprise
    4. Give up on some of the outlier browsers
  4. 1

    That's quite a hard target to hit. Good start is to find out what device/browser combo are 99% of your users using. Then find out what fallbacks and polyfills you need to use and do a lot of testing. Preferably on real devices and seek opportunities to automate.

  5. 1

    Probably nothing to be honest, because there are so many browsers, mobile devices, computer screens out there which covering 99% would eat up too many resources.
    There are some saas tools out there for "cross-browser compatibility" testing, it if you don't want to do it manually.