Add Expires headers

前端 未结 5 477
温柔的废话
温柔的废话 2020-12-12 11:38
Add Expires headers
There are 21 static components without a far-future expiration date.

    http://static.doers.lk/examples-offline.css
    http://static.doers.lk/         


        
5条回答
  •  情书的邮戳
    2020-12-12 12:11

    
        # Enable expirations
        ExpiresActive On 
    
        # Default directive
        ExpiresDefault "access plus 1 month"
    
        # My favicon
        ExpiresByType image/x-icon "access plus 1 year"
    
        # Images
        ExpiresByType image/gif "access plus 1 month"
        ExpiresByType image/png "access plus 1 month"
        ExpiresByType image/jpg "access plus 1 month"
        ExpiresByType image/jpeg "access plus 1 month"
    
        # CSS
        ExpiresByType text/css "access plus 1 month"
    
        # Javascript
        ExpiresByType application/javascript "access plus 1 year"
    
    

提交回复
热议问题