How should I handle unsupported browser features in my app?

0
0
Asked By CuriousCoder127 On

I'm running into some issues with Sentry that are reporting errors tied to the `.toSorted` method and the Popover API. According to Caniuse, these features have around 90% global support. While these errors aren't crashing my app, one feature does make things look off. I'm wondering, should I write my code to account for unsupported features indefinitely? Is it better to always compile to ES5? Or is it okay to just accept that users with outdated browsers will have a degraded experience?

2 Answers

Answered By BrowserBuff67 On

Honestly, be cautious with what Caniuse reports. Their stats are global, not tailored to your actual user base. While a lot of companies might overlook the small percentage of users on old browsers, you could be missing out on significant revenue from those folks. If your business relies heavily on user engagement, it may be wiser to stick with methods like Progressive Enhancement. It makes your site accessible for everyone, including those with browser quirks or issues. Just ensure your business decides what's acceptable when it comes to supporting different browsers.

Answered By DevExplorer99 On

You might want to consider including "core-js" to improve your market share by offering support for older browsers. It’s a pretty lightweight solution for a noticeable gain. But then again, you have to think about bundle size. You’re correct that only the top-level application might need to import core-js, not all dependencies. Plus, TypeScript can help in auto-polyfilling new ES features, but keep in mind that it likely won't cover browser-specific APIs like the Popover API.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.