Back to Search
Start Over
Precise display time measurement in JavaScript for web-based experiments.
- Source :
-
Behavior research methods [Behav Res Methods] 2023 Apr; Vol. 55 (3), pp. 1079-1093. Date of Electronic Publication: 2022 May 17. - Publication Year :
- 2023
-
Abstract
- Conducting research via the Internet is a formidable and ever-increasingly popular option for behavioral scientists. However, it is widely acknowledged that web-browsers are not optimized for research: In particular, the timing of display changes (e.g., a stimulus appearing on the screen), still leaves room for improvement. So far, the typically recommended best (or least bad) timing method has been a single (RAF) JavaScript function call within which one would give the display command and obtain the time of that display change. In our Study 1, we assessed two alternatives: Calling the RAF twice consecutively, or calling the RAF during a continually ongoing independent loop of recursive RAF calls. While the former has shown little or no improvement as compared to single RAF calls, with the latter we significantly and substantially improved overall precision, and achieved practically faultless precision in most practical cases. Our two basic methods for effecting display changes, plain text change and color filling, proved equally efficient. In Study 2, we reassessed the "RAF loop" timing method with image elements in combination with three different display methods: We found that the precision remained high when using either or changes - while drawing on a element consistently led to comparatively lower precision. We recommend the "RAF loop" display timing method for improved precision in future studies, and or changes when using image stimuli. We publicly share the easy-to-use code for this method, exactly as employed in our studies.<br /> (© 2022. The Psychonomic Society, Inc.)
- Subjects :
- Humans
Web Browser
Reaction Time
Internet
Subjects
Details
- Language :
- English
- ISSN :
- 1554-3528
- Volume :
- 55
- Issue :
- 3
- Database :
- MEDLINE
- Journal :
- Behavior research methods
- Publication Type :
- Academic Journal
- Accession number :
- 35581437
- Full Text :
- https://doi.org/10.3758/s13428-022-01835-2