0

I have researched and did all sorts of optimizations to my jquery files.

I compiled only codes that didn't return errors with http://closure-compiler.appspot.com/ so in that case, all the jquery libraries return at least 20 errors so I left them as they were.

Then I put these

jquery.min.js
jquery-ui.js
jquery.validate.min.js
jquery.cookie.js

all into one file called jquery.js. This file is 657kb!!! Is that okay? I do notice some leg at loading but nothing serious than what it was before.

I also have my scripts file called functions.js and that one is 40kb (most of it compiled)

And I am using the moment.js library as well which is 83kb.

that's a total of 780kb that has to load just in scripts! Any suggestions how to reduce that?

sehe
  • 374,641
  • 47
  • 450
  • 633
Gadgetster
  • 473
  • 3
  • 12
  • 33

1 Answers1

1

Try to use YUI Compressor to compress your JavaScript files.

For the standard jquery javascript, get the minified version like you used jquery.min.js insted of jquery.js

Or you can dwonload the YUI Compressor and compress your own files

java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js
saysiva
  • 810
  • 1
  • 7
  • 11