Test if browser is WebKit

Benchmark created by Blixt on


Preparation HTML

<script>
  var ua = navigator.userAgent,
      res;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
RegExp
res = RegExp(' AppleWebKit/').test(ua);
ready
indexOf
res = ua.indexOf(' AppleWebKit/') !== -1;
ready
Failing RegExp
res = RegExp('ChocolateCake').test(ua);
ready
Failing indexOf
res = ua.indexOf('ChocolateCake') !== -1;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Blixt on
  • Revision 3: published by Blixt on