How to organize minification and packaging of css and js files to speed up website?

前端 未结 11 1163
独厮守ぢ
独厮守ぢ 2020-12-28 19:41

I am doing speed optimization for my website application. And I found some practises to do that. For example Best Practices for Speeding Up Your Web Site from Yahoo. Among t

11条回答
  •  萌比男神i
    2020-12-28 20:38

    I've integrated minification to my deployment process. I do it in perl with packages JavaScript::Minifier and CSS::Minifier.

    During my development, I want to keep the script expanded. I put some comments in my HTML so that my script knows which files to put togetheer and minify:

    
    
    
    
    
    
    
    

    A couple of regular expression, and I quickly get a "production" version with minified files.

提交回复
热议问题