Solved

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

Posted on 2016-09-23
2
125 Views
Last Modified: 2016-09-23
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
Comment
Question by:Johnson Thomas
  • 2
2 Comments
 
LVL 43

Expert Comment

by:zephyr_hex (Megan)
ID: 41812666
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
 
LVL 43

Accepted Solution

by:
zephyr_hex (Megan) earned 500 total points
ID: 41812682
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question