Javascript is plays important role in any web based application.But some times javascript also lead to slowness in the webpages. In order to improve java-script performance we can use following techniques.
1. Add all the javascripts in the bottom of the page instead of adding in the head.
2. Try to combine all the javascripts functions and include through external file instead of including all scripts in main file.
3. We can minimize the javascript we are using in the application. This will reduce the load time as much.
4. We can also enable asynchronously down the load script,this option improves the DOM construction during webpage load.
1. Add all the javascripts in the bottom of the page instead of adding in the head.
2. Try to combine all the javascripts functions and include through external file instead of including all scripts in main file.
<script src="ourscript.js"></script>
3. We can minimize the javascript we are using in the application. This will reduce the load time as much.
4. We can also enable asynchronously down the load script,this option improves the DOM construction during webpage load.
<script async="async" src="ourscript.js"></script>
0 Comments
Post a Comment