1. expires 是在http的回應中,也就是Response-Header,expires [time| epoch| max| pff] ,后面的設置會影響Cache-Controller, 如果是負數則 on-cache,否則就是max-age=time;
2.
expires 30s; //表示把數據緩存30秒
expires 30m;//表示把數據緩存30分
expires 10h;//表示把數據緩存10小時
expires 1d;//表示把數據緩存1天
3. expires一般的都是放在http,server,location里面的,比如你設置當前目錄下的圖片緩存到瀏覽器:
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${
root /home/wwwroot/default;
expires 30d;
}
這樣,你一訪問圖片(127.0.0.1\Jackey.png),就會自動的緩存到瀏覽器的了。