Home » Tutorials » Usability » Using JavaScript

Using JavaScript

JavaScript provides a great user experience, for those that can use it. From the last estimate I read, about 1-2% of users do not have JavaScript enabled for some reason or another. I am not just arguing for you to read this for that little group of users. What if you update your JavaScript and you have an error? All of your JavaScript functionality could become useless. How much of your page is JavaScript dependent? JavaScript is awesome, but it is not for everyone.

JavaScript Usability Issues

Additional User Experience

JavaScript should only be to provide a better user experience. I do not care what reasons you can come up that show JavaScript as being the only means to do a particular task. Send the problem to me, I will show you a solution without using JavaScript. How annoying is that some of the top websites require you to have JavaScript enabled? Were we not complaining about the Flash player a few years ago? It makes no sense that, as we move forward, we create more dependencies for our users. The dependencies should be placed on our servers not the user’s computer.

Ajax?

Ajax is a wonderful technology that provides a seamless experience for the users. However, it also has confused a number of users during its evolution. If you do not incorporate a loading gif into your “Ajax Submissions”, you might have noticed a large amount of duplicate submissions. Welcome to the issue with Ajax usability. Another issue with Ajax, is that people like to share things. Sometimes they want to show their friends the web page they are on. Sadly, that page has made several Ajax requests to get to their current web page. So, the user shares the url with their friends and everyone is confused as they see 2 different pages. Now, there are ways around this issue like changing the url on each request, but you should implement those if you plan to implement Ajax functionality. Finally, you should create Ajax independent ways to perform similar functionality. For instance, you could have a form that submits using Ajax in a “click” event. If JavaScript is disabled, the form should submit like normal without Ajax.

Validation

Validating form data using JavaScript is a fantastic idea. Do NOT forget that client side technologies like JavaScript can be manipulated by a smart user. Always validate the data on the client side as well. The reason why validation is awesome with JavaScript is that you reduce your server’s blood pressure. Each time JavaScript catches some bad input, it can tell the user to correct it before sending the form; therefore, your server might only get one good request instead of five bad ones.

I do not mean to be discouraging of JavaScript. I love JavaScript and believe it paves the way for a better user experience. However, my belief is that you should always build a website without JavaScript first. After you complete the website, feel free to go back and add in some JavaScript, but never remove old functionality to implement new JavaScript. Use JavaScript, but think of all of your users.



Link/cite this page

If you use any of the content on this page in your own work, please use the code below to cite this page as the source of the content.

  • Stewart, Suzy. "Using JavaScript". After Hours Programming. Accessed on March 16, 2024. https://www.afterhoursprogramming.com/tutorial/usability/using-javascript/.

  • Stewart, Suzy. "Using JavaScript". After Hours Programming, https://www.afterhoursprogramming.com/tutorial/usability/using-javascript/. Accessed 16 March, 2024.

  • Stewart, Suzy. Using JavaScript. After Hours Programming. Retrieved from https://www.afterhoursprogramming.com/tutorial/usability/using-javascript/.



Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.