Study assets on MindProbe are served without gzip/brotli
Hi,
Lotje suggested I post this here after emailing support.
Static study assets on jatos.mindprobe.eu are served uncompressed. For my study the main HTML file is 124 KB and goes over the wire as 124 KB.
Anyone can check this from a running study:
const e = performance.getEntriesByType('resource').find(x => x.name.endsWith('index.html'));
console.log(e.nextHopProtocol, e.encodedBodySize, e.decodedBodySize);
// h2 123760 123760 <- encoded == decoded, no compression
The same file compresses locally to 36 KB with gzip -6 (-71%) and 29 KB with brotli (-76%).
Why this matters beyond bandwidth: some of my participants connect from regions with unstable routes to European servers. I have one confirmed case where the HTML download stalled part-way. The browser had parsed the title but never received the body, so the page stayed blank, the tab kept spinning, and the participant could not take part. Reloading did not help. A smaller transfer means fewer opportunities for the connection to break, and the benefit is largest exactly for the participants who are hardest to reach.
This affects every study on the instance, not just mine: jspsych.js, plugin files and CSS are all text and all served uncompressed.
Would it be possible to enable compression for text types under /study_assets? In nginx that is roughly:
gzip on;
gzip_types text/html text/css application/javascript application/json image/svg+xml;
gzip_min_length 1024;
Happy to verify from my side once it is in.
Thanks,
Margarita (study 28199)