How to combine requests for multiple javascript files into one http request?

后端 未结 4 544
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-08 23:53

This concept is a new one for me -- I first came across it at the YUI dependency configurator. Basically, instead of having multiple requests for many files, the files are chain

4条回答
  •  生来不讨喜
    2021-02-09 00:29

    Capistrano is a fairly popular Ruby-based web deployment tool. If you're considering it or already using it, there's a great gem that will figure out CSS and Javascript dependencies, merge, and minify the files.

    gem install juicer

    From the Juicer GitHub page, it can figure out which files depend on each other and merge them together, reducing the number of http requests per page view, thus improving performance.

提交回复
热议问题