Psychophysics in a Web browser? Comparing response times collected with JavaScript and Psychophysics Toolbox in a visual search task

de Leeuw, Joshua R.; Motz, Benjamin A. · 2015 · OpenAlex-citations

DOI: 10.3758/s13428-015-0567-2

archive: archived pipeline: cataloged verified

Get this paper ↗ (DOI — opens at the source; we link to it, we don't host it)

Summary

This study addresses the validity of using JavaScript for collecting response time data in online behavioral experiments, comparing it against the laboratory standard, MATLAB’s Psychophysics Toolbox (PTB). While online experiments offer broader participant access, concerns persist regarding the precision of web-based software, particularly JavaScript’s event-driven architecture, which may introduce timing errors. The authors aimed to determine if these errors systematically affect response time distributions in a way that compromises experimental sensitivity. To isolate software effects from hardware and participant variables, the researchers employed a novel interleaved design. Thirty participants completed a visual search task where trials were presented simultaneously by two independent computers running either JavaScript (via the jsPsych library) or PTB. Two projectors were aligned to display stimuli on the same screen, and Arduino microcontrollers managed trial sequencing and recorded responses from a custom hand-held device. This setup ensured that each participant experienced identical stimuli and conditions, allowing for direct within-subject comparisons of response times measured by the two software packages. The task involved identifying the presence or absence of a target among distractors, with set sizes varying from two to six items. Using Bayesian hierarchical modeling, the analysis revealed that JavaScript measured response times approximately 25 ms longer than PTB, with a 95% highest density interval ranging from 8.18 to 44.5 ms. However, the study found no reliable differences in the variability of response time distributions or in the slope of the search function (the increase in response time per additional item) between the two platforms. Both software packages were equally sensitive to experimental manipulations, accurately capturing the expected linear increase in response times as set size increased. The model’s predictive validity was confirmed by its ability to closely approximate empirical data patterns. The findings conclude that JavaScript is a suitable tool for measuring response times in behavioral research. Although JavaScript introduces a consistent additive lag compared to PTB, this error does not distort the shape of response time distributions or reduce sensitivity to experimental effects. This supports the use of online experiments for within-subject comparisons, suggesting that the slight timing discrepancy is negligible for most psychological research applications. The study provides empirical validation for the growing use of web-based platforms in psychophysics, encouraging broader adoption while acknowledging the minor, constant delay inherent in browser-based timing.

Provenance

The full processing record for this entry. Every stage of this paper's journey through the pipeline is logged — what ran, with which tool and model, how many attempts it took, and when it last completed.

StageOutcomeToolModelPromptAttemptsCompleted
discover success OpenAlex-citations 1 2026-06-24
archive success unpaywall 2 2026-06-26
extract success cached 2 2026-06-26
clean success clean 1 2026-06-26
chunk success chunk 1 2026-06-26
embed success embed Qwen/Qwen3-Embedding-8B 1 2026-06-26
enrich failed 1 2026-06-26
promote success 1 2026-06-24
summarize success llm qwen3.6-27b-prismaquant summ-v5 1 2026-06-26
tag success vector_similarity 6 2026-06-26
verify success 1 2026-06-26

Summary generated by qwen3.6-27b-prismaquant on 2026-06-26; verification: verified.

Topics

Ranked by relevance to this paper. Hover a topic for its definition.

Information type

What kind of knowledge this paper contributes, grouped by family — independent of topic (what it is about) and method (how it was studied).