In HTML webpage, the content within noscript tags are not getting rendered by browsers with script blocking extension.
I have a page
http://www.zen76171.zen.co.uk/aaa2.html
with this HTML
<!doctype html>
<html>
<head>
<noscript>aaa</noscript>
<script>document.write("bbb")</script>
</head>
<body>
ccc
</body>
</html>
I understand that the contents of the noscript tag should run if a browser is not running javascript.
In chrome or firefox, with no extensions blocking anything, I get the output of bbb ccc
. That's fine, that makes sense. 'bbb' shows because javascript is allowed, and ccc
shows because it will show whether javascript is enabled or not.
If I install e.g. the uBlock origin extension or if in Firefox I install the NoScript extension(note- the name of that extension is coincidentally the same as the noscript tag), then when I reload the page I mentioned
http://www.zen76171.zen.co.uk/aaa2.html
It shows ccc
. That indicates to me that scripts are being blocked (as it didn't show bbb
, so that part(not showing bbb
, is good.
But the output I would expect is aaa ccc
, because I'd expect 'aaa' to show when scripts are disabled, and scripts are disabled.
There is also a secondary problem that I work around, which is that if I disable or even 'remove' the NoScript extension from Firefox, then I still get the same response of 'ccc', I have to uninstall and reinstall Firefox to remove the NoScript extension. But for now that will do when I want to remove the NoScript extension. uBlock Origin has no such issue(don't need to reinstall a browser to remove it!). So if anybody tries to reproduce this problem then I suggest they either use the script blocker they have, or as I have, use uBlock Origin.
Why does it show just 'ccc'
and not 'aaa ccc'
(when scripts are blocked)?
This is the case with uBlock Origin, or with the NoScript extension. So, it seems, it's with anything that disables scripts.
So, why is the aaa
not being displayed ever. I'd think it should be displayed when scripts are disabled.