sessionStorage vs cookie

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
sessionStorage
sessionStorage.setItem("foo", "bar");
sessionStorage.getItem("foo");
ready
cookie
document.cookie = 'foo=bar; path=/';
document.cookie.match(`(^|;)\\s*foo\\s*=\\s*([^;]+)`).pop();
ready

Revisions

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