How should one tell website visitors that a website makes heavy use of JavaScript?

  • 5
    It would be great if you marked the answer that helped you resolve the problem so that if someone else faces the same problem and finds your question they know what to do. – dnbrv Feb 27 '12 at 16:49

If the user has intentionally disabled Javascript, it's probably because they explicitly want to avoid sites that "make heavy use of javascript" and would thus have a bad impression of such a statement. Explaining to them what they're missing is the best way to convince them to change.

Clearly state what they're missing. Chances are there's some good reason you want them to use Javascript.

If the site looks a little nicer with JS, tell them that. If the site's forms don't work/validate without Javascript, tell them that. Tell them whatever's important to them. A generic message that says you use Javascript will do little to convince most users to enable it.

| improve this answer | |
  • 5
    A good attitude to lots of situations: Tell users something that is meaningful to them - make it personal. Use the word You. – Roger Attrill Nov 15 '11 at 20:00
  • 10
    +1 because you need to tell them why they should use the js on this site, not why you wanted to use it. – Schroedingers Cat Nov 15 '11 at 20:25

I'd just use the noscript tag.

    <div class="error message">
        We're sorry but our site <strong>requires</strong> JavaScript.

or it can just be a notice that says it works best with JavaScript enabled like this site does.

| improve this answer | |
  • 5
    This is a generic message that does little to convince people to enable JS. -1 – ALH Mar 27 '12 at 2:35
  • This only works if JavaScript is totally disabled in the browser. In my experience, the more common reason for JS not working is that the script file has been blocked by a company proxy server (or similar). This message would not display in that instance. – NickG Jan 20 '15 at 10:16

If you want to check for certain JavaScript features you could use a library like Modernizr. You can use it to check for JavaScript, but it might be overkill for the simple check.

A fast soloution would be to use the <noscript> tag.

| improve this answer | |
  • 3
    How is Modernizr of any use when the user has disabled JavaScript? – Agos Nov 18 '11 at 13:18
  • 3
    You add a class of no-js to your <html> tag (hard-coded). Modernizr refines it to js if JavaScript is enabled. Counter-intuitive concept to use js to detect js, but it works ;-) – Benedikt Olek Nov 18 '11 at 13:44

Modernizr would be a good bet if you wanted to try your best to support older browsers, but it won't necessarily do much if JavaScript is disabled entirely.

In the past, I've simply used a combination of the <noscript> tags and a useful message with a link to an external resource to help get things enabled again (for the new computer users who don't know how to do it). I set it up as a bright orange bar at the top of the website (similar to how the Stack Exchange network of sites do it).

example image

That displays in nice, big font on an orange background to get the user's attention. The link takes them to a useful page that detects their browser and shows them the appropriate steps (with images) to get JavaScript enabled again.

Of course, you can always include practical reasons as to why the user's experience will be better with JavaScript enabled as part of the message, but for my purposes the application simply will not function without it so I simply say it is required.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.