Files
sousa-gecko/dom/base/test/jsmodules/scriptDisabledDiskCache_module.sjs
Yoshi Cheng-Hao Huang e3c5c2dbec Bug 2061080 - Part 6: Don't cache the empty module, and discard any pending off-thread compilation. r=arai
Drop the disk cache reference and the SRI for the empty module script created
during scripting is disabled.

Also the result of an off-thread compilation is never consumed here either,
cancel it as well.

Differential Revision: https://phabricator.services.mozilla.com/D322567
2026-09-03 08:38:55 +00:00

10 lines
295 B
JavaScript

"use strict";
function handleRequest(request, response) {
response.setHeader("Content-Type", "text/javascript", false);
// Make the response cacheable in the HTTP cache.
response.setHeader("Cache-Control", "max-age=3600", false);
response.write("export const marker = 'module';\n");
}