Minify jQuery with PHP
What is the best way to minify jQuery with other js files. My goals is one request for all my JS files. I have about 6 other js files that I would like combine with jQuery and the jQuery UI. When I leave the jQuery library and UI library out of the minification file it is fine. So I have three requests:
- jQuery library
- jQuery UI
- minified remaining js files
I tried combining the 1&2 with 3 but jQuery always says it is undefined. I tried using both the minified and NON minified versions o开发者_StackOverflow中文版f jQuery.
I am using the php minify program from yahoo. Any suggestions?
Thanks, Brian
Make sure you combine them in the correct order. jQuery must be first.
Try using Reducisaurus, as long as you define the files in the right order everything should work fine.
PS: Make sure you cache the Reducisaurus minification, sometimes it is too busy to serve your files.
精彩评论