Why we use JavaScript and have turned our backs on Flash

May 22, 2011

The topic of JavaScript vs. Flash is one that has been discussed and debated for years, and there are already thousands of articles on the subject. However, we still encounter a lot of clients who don’t realize the difference between the two or don’t understand why we’ve settled on JavaScript. Hopefully this article will help to explain both.

So what’s the difference?

Adobe Flash is a multimedia platform that was developed as a way to add animation, video, audio, and other interactive elements to web pages. Viewing Flash content requires the use of a free plug-in. Developers must embed the Flash content into the HTML document, which means that the Flash content is independent of the other content on the page.

JavaScript is a lightweight, and open-source scripting/programming language designed to add interactivity to HTML pages. Unlike Flash, support for JavaScript is built right into all major web browsers without the need for additional plug-ins. JavaScript works by manipulating HTML content, which means that all content on the page is seamlessly integrated.

Why do we use JavaScript?

Firstly, JavaScript has become immensely powerful and easy to use with the development of JavaScript libraries such as jQuery, MooTools, Prototype, etc. jQuery, our library of choice, is fast, concise, and versatile. It allows us to rapidly add complex interactivity to webpages without spending a lot of time. jQuery is also an open-source project with many developers working tirelessly to improve it each day.

The Web was meant to be an open system, and to use open-source tools is to follow in that virtue. I that same vein, JavaScript/jQuery is FREE. Flash (as a tool) can be an expensive initial investment and also expensive to maintain as upgrades are released over the years.

Another problem with Flash is that the required plug-ins to support Flash content aren’t available on all platforms, namely iPhone, which means that you could be limiting your content from a huge portion of web users by using Flash. Meanwhile, jQuery works on these devices with no problem. Furthermore, even if JavaScript is disabled in a user’s browser, because JavaScript is unobtrusive in nature (integrated content), those users still have access to all of your site’s content.

Finally, JavaScript is universal. As a web project changes hands from one developer to another, no special applications are required to view or edit JavaScript files. Additionally, JavaScript is a widely known language, therefore, future modifications should be able to be made by nearly any web developer handling the project.

These are just some of the reasons we’ve chosen to use JavaScript. Hopefully next time you’re looking to add some interactive elements into your site, you’ll take a look at using JavaScript & jQuery instead of Flash.