Skip to content

Browser detection code #1984

Answered by amunn
amunn asked this question in Q&A
Discussion options

You must be logged in to vote

Browser detection is a bit of a minefield, so I decided to use an external library bowser which seems well maintained and allows for quite fine-grained detection abilities.

My approach with respect to the jsPsych code was to use the on_start and on_finish parameters of an html-keyboard-response trial to conditionally present the browser check message (either reject or accept) and conditionally continue or end the experiment. I'd be interested in comments on this method or if there is another more elegant way to do this.

Thanks to Paulo Cereda for discussion.

// browser rejection routine
// Copyright 2021 Alan Munn
// Use this as the first task on your timeline to verify browser
// MIT Lic…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amunn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant