Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
How to handle 3rd party JS that doesn't support "old" browsers

I've confirmed a suspicion I've had that my website isn't working well in Android WebView. It turns out that starting at API 29 (Android 10) and earlier, it actually fails spectacularly, and this is caused by 3rd party JavaScript. For API 29 specifically, I can see the errors, and of course will report those back to the projects, but for 28 sometimes the entire browser crashes very early, so I can't even tell which particular piece of JS is causing the problem (I guess I can manually remove everything and add it back one piece at a time, but that's a project for another day).

These browsers represent at least 1/3rd of my traffic (and maybe much more, because I don't know what percentage is crashing before analytics start reporting), so it's a Must Fix problem.

Also, while I've been able to verify this for Android WebView, I strongly suspect it's happening for 3rd-party chromium browsers (e.g., MIUI, or Samsung browser).

Now, I'm running my own little bit of JS that is heavily involved in the loading of the other scripts, to improve performance, so I have really fine-grained control over what gets loaded, and when.

The question is, what's the preferred way of handling this? Do I check for something in userAgent and then conditionally load the scripts? That seems ... pretty fragile. I'm guessing there's some "industry standard" way of doing this, since it must be a pretty common problem that 3rd party code doesn't work in some random environments, and it's not as though Android 10 is that old.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!