My website's performance has decreased. My website needs 13 secs to download. So i want to combine js scripts to one script. But i don't know how to do it. Please tell me very easy ways to combine js scripts to one. If you can please combine all js scripts to one. I am totally novice programmer. Here is the home page code: <?php include './include.php';?> <!DOCTYPE html> <html lang="en"> <head> <title>Doctorscare24's 24/7 health care</title> <script type="text/javascript" src="js/html5.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-26211200-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <meta name="alexaVerifyID" content="GlO_yDjmSUpXLZQ19nRYpqxnGDI"/> <meta name="description" content="Pediatric Association's children hospital is very helpful to people. You can find journal of Pediatrics here. " /> <meta name="keywords" content="Pediatricians,Pediatric ,Pediatric Association,Pediatric Associates,Pediatrics journal,Pediatric journal,journal of Pediatrics,journal Pediatrics,children hospital, Pediatric neurology,Pediatric health, Pediatrics in review,GlO_yDjmSUpXLZQ19nRYpqxnGDI" /> <meta charset="utf-8"> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> <link rel="stylesheet" href="css/grid.css" type="text/css" media="all"> <link rel="stylesheet" href="css/style.css" type="text/css" media="all"> <link rel="stylesheet" href= "/comments/comment_script/comment_script_1.4.1/template/default/style.css" type="text/css" media="all"/> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/loopedslider.js"></script> <script type='text/javascript' src='js/menu.js'></script> <script type='text/javascript' src='jquery-1.2.3.min.js'></script> <script type="text/javascript"> $(function(){ $('#loopedSlider').loopedSlider({ autoStart: 6000 }); }); </script> <!--[if lt IE 7]> <script type="text/javascript" src="http://info.template-help.com/files/ie6_warning/ie6_script_other.js"></script> <![endif]--> <!--[if lt IE 9]> <script type="text/javascript" src="js/html5.js"></script> <![endif]--> </head> HTML:
The javascript is in linked files and will be cached. It is extremely unlikely that it is causing the speed problems on your site. Some javascript libraries supply two copies, one with whitespace (a bigger file) and one without. The one with is much easier to read and debug while the one without will load more quickly. I'd look at server issues and image sizes and even your css before you go messing with those particular javascript files. You may get some speed advantages by serving javascript and static images from a subdomain which is more about how browsers work than about how your site is constructed.
Cut and paste all of your javascript files into one text document. Then save as a new javascript file. 30 seconds and you are done.