Browser support¶
-
We serve JavaScript to any browser that supports fetch. We use esbuild to transpile and minify our JavaScript.
-
We prefix CSS for every browser in our browserslist. We use autoprefixer to add vendor-specific prefixes to rules where necessary.
Outputting browser support metrics¶
Within the root directory, run npx browserslist to output the set of browser
targets given to autoprefixer (CSS) transpiling.
Note
A browserslist string is used in package.json.
See the
browserslist docs
for information on this string and the defaults.
For JavaScript, esbuild uses the es6 target and
our code conditionally includes JavaScript in browsers that
support fetch.
Note
JavaScript may still be delivered to legacy browsers in the form of our analytics and related scripts.
Current browser support metrics¶
Twice per year we aim to updated the browser metrics that are fed into our browserslist config at @cfpb/browserslist-config.
Per the best practices published by browserslist, we use a 0.2% cutoff with this config for the browsers that get fed into our build systems.
However, for what we actively aim to support and test, we use a higher cutoff of 1%. The current 1% cutoff list is:
and_chr 144
chrome 143
chrome 142
chrome 141
chrome 140
chrome 139
chrome 138
chrome 137
edge 143
edge 142
edge 141
edge 140
edge 139
edge 138
ios_saf 18.5-18.7