Solved

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

Posted on 2016-09-23
2
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

749 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