file_no_cache.sjs (785B)
1 const MESSAGE_PAGE = function (msg) { 2 return ` 3 <html> 4 <script type="text/javascript"> 5 onload = () => window.parent.postMessage({test : "${msg}"},"*"); 6 </script> 7 <script> 8 addEventListener("back", () => { 9 history.back(); 10 }); 11 addEventListener("forward", () => { 12 history.forward(); 13 }); 14 </script> 15 <body> 16 <a id="test2_button" href="https://example.com/browser/dom/security/test/sec-fetch/file_no_cache.sjs?test2">Click me</a> 17 <a id="test3_button" href="https://example.com/browser/dom/security/test/sec-fetch/file_no_cache.sjs?test3">Click me</a> 18 <body> 19 </html> 20 `; 21 }; 22 23 function handleRequest(request, response) { 24 response.setHeader("Cache-Control", "no-store"); 25 response.setHeader("Content-Type", "text/html"); 26 27 response.write(MESSAGE_PAGE(request.queryString)); 28 }