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

forgot password?



Reply


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

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


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

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
ConorTreacy.com <- That's Me! ;)
 
 
The Following User Says Thank You to bigredseo For This Useful Post:
SenseiSteve (05-22-2018)


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

Status: 24x7server is offline
Have you tried these sites?

https://www.filesmerge.com/merge-javascript-files
https://jscompress.com/
__________________
www.24x7servermanagement.com
Server Management, Server Security, Server Monitoring.
Network Monitoring Team !! Skype: techs24x7
 
 
 
Reply

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: