What must I do to make content such as images served over HTTPS be cached client-side?

后端 未结 7 943
别那么骄傲
别那么骄傲 2021-02-06 12:54

I am using Tomcat as a server and Internet Explorer 6 as a browser. A web page in our app has about 75 images. We are using SSL. It seems to be very slow at loading all the cont

7条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 13:03

    Some browsers will cache SSL content. Firefox 2.0+ does not cache SSL resources on disc by default (for increased privacy). Firefox 3+ doesn't cache them on disc unless the Cache-control:public header appears.

    So set the Expires: header correctly and Cache-control:public. e.g.

    
            # Expire these things
            # Three days after access time
            ExpiresDefault  "now plus 3 days"
            # This makes Firefox 3 cache images over SSL
            Header set Cache-Control public
    
    

提交回复
热议问题