aw-watcher-web
aw-watcher-web copied to clipboard
getBrowserName performance improvement
Performance improvement on the getBrowserName function.
- app.js file size goes from 115.8KB -> 73.5KB
- Using String.prototype.includes() instead of Regex
- Avoid .exec() on many regexes (From ua-parser-js dependency)
Negative impact being that aw-watcher-web will not detect more rarely used browsers. This might be justified due to the application only being on the Firefox and Chrome addon store and the ease of adding support for a missing browser. The browser name "unknown" is used in the case of an unsupported browser.
I tested this on Firefox only.