Solved

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

Posted on 2016-09-23
2
58 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 42

Expert Comment

by:zephyr_hex
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 42

Accepted Solution

by:
zephyr_hex 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now