QueryString with javascript (v12)

Revision 12 of this benchmark created by amin on


Description

Test two methods of retrieving QueryString values with javascript.

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Split method
var qs = window.GetQueryString(query);

var search = qs["q"];
var value = qs["value"];
var undef = qs["undefinedstring"];
ready
Regex method
var search = window.getParameterByName("q");
var value = window.getParameterByName("value");
var undef = window.getParameterByName("undefinedstring");
ready

Revisions

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