vendredi 22 mars 2019

Checking rather the browser is modern on the client

In our web project, we plan to start logging to the server Client side errors. We plan to start using window.onError to catch all uncaught errors. Our front-end stack includes React and Typescript, and this should create many errors on non-supported non-modern browsers. We are worried that such browsers will log enormous amounts of errors which are irrelevant to the server, and we'd rather filter these noises. How can we filter, and log a message to the server only if the browser is modern? Perhaps we can find out which browser the client is using, and test if it's modern against a regular expression.




Aucun commentaire:

Enregistrer un commentaire