-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maintain browser compatibility #411
Comments
I did a little case study. We have been recording analytics with Matomo since March 2024, so I took a look at the browser versions used at our Korp site since then. Then I looked up which browsers support the JS
Among the browsers not listed at caniuse.com, the most used ones are Facebook (1.9%), Brave (0.8%) and Google Search App (0.6%). |
@arildm, thanks for the statistics. Based on them, it would appear pretty safe to use the Now that I investigated the issue a bit, it seems to be even more complicated than I thought, as browsers don’t in general implement a certain ES version but instead individual features. In principle, you’d then need to check the support for each feature. However, could you in practice assume that at least most of the core features of an ES version are implemented in most relatively recent browsers? If so, would ES2020 be a reasonable choice? ( I see that you’ve converted a large part of the Korp frontend codebase to TypeScript. Do you also intend to convert the rest of the code to TypeScript? If so, I’m wondering if or how that will affect the issue of browser compatibility, as you then have a certain (minimum) version for TypeScript having certain features and as you can specify the ES version the code is transpiled to. Based on Should we then in fact stick to ES6 also for JavaScript code as long as there is some around? As far as I can see, the JS code in Korp didn’t use Previously, Korp used to use Babel to support older browsers while allowing more modern code. I’m wondering why you stopped using it. Did it complicate the build process? Or did it add unnecessary or slow code? Or do the majority of browsers today support the features used in the code well enough? Or was it because TypeScript is the way to go? And no, I don’t wish Babel back; I’m just wondering, as the commit 65e94eb8 removing it doesn’t mention any rationale for the removal. By the way, |
Do we need to support web browsers lacking modern language features?
Some users may be unable or unwilling to switch/update their browsers.
Offering a wider support requires refraining from new language features or adding transpilation or polyfills.
The text was updated successfully, but these errors were encountered: