如何设置max-age或expires来缓存您的站点文件
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 方法: <meta http-equiv="Cache-Control" content="max-age=7200" /> <meta http-equiv="Expires" content="Mon, 20 Jul 2009 23:00:00 GMT" /> 详情: Cache-control用于控制HTTP缓存(在HTTP/1.0中可能部分没实现,仅仅实现了Pragma: no-cache) 数据包中的格式: Cache-Control: cache-directive cache-directive可以为以下: request时用到: | "no-cache" | "no-store" | "max-age" "=" delta-seconds | "max-stale" [ "=" delta-seconds ] | "min-fresh" "=" delta-seconds | "no-transform" | "only-if-cached" | "cache-extension" response时用到: | "public" | "private" [ "=" <"> field-name <"> ] | "no-cache" [ "=" <"> field-name <"> ] | "no