I noticed Facebook does this where they have a meta refresh enclosed in a <noscript>
enclosed in the <head>
tag. They use this to detect if the user agent has javascript enabled or not.
We were thinking of using this method for 2 reasons:
Will using this method for the above reasons cause any adverse effects that will affect a large percentage of user agents?
No, there shouldn't be any extravagantly adverse effects by using the <noscript>
tag in the head.
That said, there are some disadvantages to <noscript>
:
<noscript>
tag will be invisible if the Javascript is blocked by a firewall.<noscript>
content.<noscript>
in the head, it is technically invalid X(HTML) so your pages might not validate.IMO, what you are wanting to do is a very good thing, and is an appropriate use of the tag. However, an even better solution would be to use feature detection within your Javascript to enable Javascript features, rather than using <noscript>
to disable them.
If you are depending on HTML5 features, I would recommend the Modernizr library for this purpose.