Note this test requires that you have JavaScript Enabled
<script>
//if CSP is supported this will not run
window.onload=function(){
var jsNode = document.getElementById("jsNode");
jsNode.innerHTML = "<h3> CSP Not Supported</h3> Your browser does not support CSP, the inline script executed and replaced this div content";
jsNode.className = "alert alert-danger";
};
</script>
This test attempts to load an image: https://unsplash.it/200/200
<img src="https://unsplash.it/200/200" alt="CSP Should Block This Image From Loading" id="cspImg">
If you see a gray box above then the image loading failed (presumably due to CSP, but it could also fail for other reasons such as the server being down).
CSP Level 2 does allow execution of inline scripts if a Hash is present in the script-src directive.
CSP Level 3 unsafe-hashes within script-src directive.