By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

Using the Noscript Element

About the noscript element, and when it makes sense to use it.

Created: 2013-06-28 00:49

The Noscript element of HTML, is used to render alternative content, to user agents which doesn't support scripting.

Usually it would just be a simple message, telling the user to upgrade their browser, or that their browser doesn't support scripting.

When you should use it

This element should generally be avoided. The problem is, that when firewalls have JavaScript disabled, the content of the noscript element will be ignored entirely, even though that the browser is unable to run the script.


Extreme panic! what shell we do? Relax now, the noscript element was only really useful, back when browsers didn't support scripting. All major browsers worth mentioning, support JavaScript now.

The real problem with JavaScript, is more like support for individual features of the language. Which is something that can't be accounted for using the noscript element.

A good rule of thumb, is not to render the page content, entirely with JavaScript, or at least not make JavaScript an requirement, but rather a enhancement for those who have it enabled.

Modern browsers

Todays browsers, support more JavaScript then older browsers did. Its impossible to make the distinction, between browsers that don't support JavaScript, with those who just doesn't support the functions used by the script.

Its therefor better to rely on JavaScript based methods, to check if any given function is supported in the browser. See also: Ditch support for Old Browsers