Docs Menu
Docs Home
/
MongoDB Meta Documentation
/

Generating a Browser Coverage List

On this page

  • Prerequisites
  • Generate a Stats File
  • Generate a Browser Coverage List

While the MongoDB frontend stack is increasingly making use of new and nonstandard Web platform features (such as ES6 modules and candidate ES7 language features), a significant chunk of our users are not using evergreen browsers that are required for these features.

For this reason, we compile our JavaScript and CSS into a form that these older browsers support. However, we want to take a data-driven approach to choosing which older browsers to support using browserslist-ga.

Ensure that you have a current version of Node.js, and run the following to install browserslist-ga and browserslist:

npm install -g browserslist-ga browserslist

Run the following to generate a browserslist statistics file:

browserslist-ga

This will open a Google authentication workflow in your default browser. Sign in, and return to your terminal to provide the following answers:

Please select an account:

All MongoDB (#7301842)

Please select a property:

Combined Traffic (#UA-7301842-14)

Please select a profile:

Docs - Domain Only (#72085910)

Specify a start date:

Default is 90 days prior

Specify an end date:

Default is today

After a moment, browserslist-ga should return and write a file called browserslist-stats.json that you will provide to browserslist.

In the same directory, run the following to return a list of browsers that provide 99.5% coverage of docs visitors:

browserslist --stats=browserslist-stats.json 'cover 99.5% in my stats'

Back

Version Bumping