In my application, I load a CSS files in the back-end (using Express.JS) and load it in the frontend. However, before sending CSS code to the front-end application, I want to:
- Detect the user's browser;
- Edit the CSS code accordingly.
For example, if user A uses Chrome, remove all lines that start with -webkit-
.
How can I detect the browser and edit the CSS code with the best performance?
Note: My CSS code is formatted as beautified and not minified.