nginx可以通过设置expires对一些资源缓存,这样可以减少对服务器的请求和节省带宽格式:expires + 时间 (s/m/h/d)原理:使用于变化周期短的图片,css,js等栗子: location ~*\. (jpg|jpeg|gig|png|css){ expires 1d; }