Rules

Secret ingredients to quality software

Edit
Info

Do you avoid relying on Javascript for crucial actions?

Last updated by William Yin on 24 Aug 2015 01:08 am (over 5 years ago) See History

Don't assume JavaScript is always enabled.

JavaScript should be used to enhance the overall user experience and not as a dependency.

JavaScript is very useful for improving user-interaction, along with reducing the number of requests made on the server; but it can be disabled - an estimated 2% of web users do not have JavaScript enabled

Depending on your audience you may choose to disregard this rule, but for mainstream websites it is highly recommended that you don't rely on JavaScript for crucial actions, such as validation or business-logic purposes. Do a server-side validation instead.

Note: This rule can be applied to any other third-party technology, such as Flash or Java. If it's not built into every web browser/device or if it can be disabled, then make sure the page is still accessible and usable without it.

Tiago AraujoTiago Araujo

We open source. This page is on GitHub