Get Paid to Participate - up to $1 per post!     Twitter     Facebook
Hosting Discussion

forgot password?



  Post #1 (permalink)   05-17-2018, 03:39 PM
HD Addict
Join Date: Apr 2018
Posts: 131

Status: Chimpanzee is offline
I m kind of new to this , so how do you successfully merge some javascript files?

  Post #2 (permalink)   05-21-2018, 04:54 PM
HD Master
Join Date: Aug 2015
Location: Omaha, Nebraska
Posts: 280

Status: bigredseo is offline
You'll need to be careful on this one as sometimes you need the JS files to load in a particular order. Sometimes, merging is just not needed.

But for the very basic version, you'll just copy everything in between the <script> </script> tags (start and stop of the file) in the JS file, then copy it all to another file and paste it between the <script> </script> that exists in that file.

Again, sometimes it doesn't make sense to do this, so you'll want to check your site and code afterward and make sure it all still works.

If you're calling any jquery commands, you want to make sure that jquery loads FIRST, then you can add additional stuff.

A word of warning - if you make your javascript files too big, you'll slow down the speed of your site also.
Conor Treacy
Big Red SEO - Omaha, NE <- That's Me! ;)
The Following User Says Thank You to bigredseo For This Useful Post:
SenseiSteve (05-22-2018)

  Post #3 (permalink)   05-23-2018, 02:11 AM
HD Master
Join Date: Sep 2014
Location: India
Posts: 378
Send a message via Skype™ to 24x7server

Status: 24x7server is offline
Have you tried these sites?
Server Management, Server Security, Server Monitoring.
Network Monitoring Team !! Skype: techs24x7

  Post #4 (permalink)   04-26-2019, 07:50 AM
HD Amateur
Join Date: Nov 2018
Posts: 72

Status: ServersBase is offline
To link a JavaScript file type
<script src=”file.js”></script>
It's best to put JavaScript files at the bottom of the body.
CSS is
<link rel=stylesheet” href=style.css”>
ServersBase.Com -
█ SSD cPanel Web Hosting LiteSpeed MariaDB CloudLinux & MultiPHP!
Solutions Tailored To Your Requirements For Unbeatable Agility.
█ Fully Managed Cloud Instances, Daily Backups & Active Monitoring!

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: