How can I gzip my JavaScript and CSS files?

后端 未结 6 1012
独厮守ぢ
独厮守ぢ 2021-02-05 07:52

I have a problem, I have to gzip a prototype Lib, but i totaly have no idea how to do this, where to start and how does it works. :)

I find some tutorials but that wasn\

6条回答
  •  攒了一身酷
    2021-02-05 08:20

    add this code to your .htaccess it will gzip all your css and js files.

    # BEGIN GZIP
    
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    
    # END GZIP
    

提交回复
热议问题