Javascript code organization for optimized performance

Knowing how javascript code gets executed in a browser will help us organize the libraries or functions for better performance.

Javascript unlike the server side scripting languages like PHP, ASP, Perl is not compiled at the server side. It is sent as-is from the server to the browser client and it is the browser that interprets the code at the client side.

The total size of the Javascript code and its organization will have a significant effect on the pages served at the client side which in turn will affect the performance of the page.

Organize the libraries in such a fashion that you only have the needed functions associated with the page. You can consider this point right at the time of creating your template pages. This will reduce the number of javascript pages that are called from one page.

Now that there are many javascript frameworks like jQuery, ExtJS, Prototype, Scriptaculous that have become available in the market enabling web2.0 architecture. Developers fascinated by these different frameworks tend to use a combination of these frameworks sometimes enabling the same features which can make your pages crawl hence defeating the purpose.

Choose a framework that best fits your requirements and has the wides support in the market. Ensure that you have a compact code which is easy to manage and maintain in addition to better performance.

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Written by kurinchilamp


Website: http://

Leave a Reply

Your email address will not be published. Required fields are marked *

Read previous post:
How to reset the screen terminal output?

You might have come across instances like trying to print or output the content of binary files or similar instances...

Close