.htaccess: How to “Specify a cache validator”?

后端 未结 3 2089
醉话见心
醉话见心 2020-12-24 07:18

I\'m running Google PageSpeed on my site and it\'s tell me that I need to
\"Specify a cache validator.\"

The following resources are missing a cache validator. R

3条回答
  •  青春惊慌失措
    2020-12-24 07:59

    I think the problem you are having is with Expire: and not with Last-Modified:. Apache would by default send the file Last-Modified: header based on the file date. I suggest removing the upper code and replacing it with the following:

    
        ExpiresActive On
        ExpiresDefault "access plus 1 year"
    
    

    Try with that, if it didn't work try adding this as well:

    
        
            Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
        
    
    

提交回复
热议问题