[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 547
  • Last Modified:

how to combine multiple .js files into one js file for website?

Hi

i want to combine multiple js file in to one js file. I am using website  called multiple js file this affected in page loading website is loading very slow just look my code in below please help me.

    <!-- LOAD JS FILES -->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/easing.js"></script>
    <script src="js/owl.carousel.js"></script>
    <script src="js/jquery.fitvids.js"></script>    
    <script src="js/wow.min.js"></script>
    <script src="js/jquery.magnific-popup.min.js"></script>

    <!-- Waypoints-->
    <script src="js/jquery.waypoints.min.js"></script>
    <script src="js/sticky.min.js"></script>
    <script src="js/tipper.js"></script>
    <script src="js/compact.js"></script>
    <script src="js/custom-index1.js"></script>
   <script src="js/material.min.js"></script>

        <!-- Typed
        =====================================-->
        <script src="assets/js/typed/typed.min.js"></script>
       
        <!-- JQuery Main
        =====================================-->
        <script src="assets/js/main/jquery.appear.js"></script>
        <script src="assets/js/main/imagesloaded.pkgd.min.js"></script>
        <script src="assets/js/main/main.js"></script>

I want in one js file
0
Johnson Thomas
Asked:
Johnson Thomas
  • 2
1 Solution
 
zephyr_hex (Megan)DeveloperCommented:
Having one large js file over multiple separate js files is not going to improve performance significantly, especially since these scripts are all local.

What may help is to minify the js scripts that are not yet minified.  And remove ones that aren't needed.  That seems like an awful lot of scripts for one page...
0
 
zephyr_hex (Megan)DeveloperCommented:
Oh, and you might consider using CDNs for the popular scripts, like bootstrap.  This improves the chances that the user's browser can rely on a cached copy of the script so it doesn't have to be downloaded.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now