#1
  1. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,558
    Rep Power
    221

    Is this a reliable way to combine JS scripts?


    Hello;

    I found a few methods to do this but for some reason, the comments say those methods are bad or no longer supported.

    Question 1:

    What is a simple reliable way to combine JS scripts (with php maybe) without having to do anything on the server (ini files etc).

    Tanx
  2. #2
  3. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,904
    Rep Power
    9646
    The most reliable way would depend on the contents of the files. You can do better if you don't have to support everything possible.

    General case? Combine the files separated by a semicolon.
  4. #3
  5. A Change of Season
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,558
    Rep Power
    221
    Hello;

    You see where it says Combine JS files? ===> link <===

    It's giving me good grade for everything bur grade E for this : (

    I am not sure how comma would fix this.

    Scripts:

    https://webmoosh.com/components/js/jquery-3.3.1.min.js
    https://webmoosh.com/ctb
  6. #4
  7. Backwards Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,904
    Rep Power
    9646
    Ignore that warning. It's two files. It doesn't matter that much, especially if one of them is a library.

    Though it would be better to grab a CDNed version of jQuery. Like Google's.

IMN logo majestic logo threadwatch logo seochat tools logo