本地缓存也是缓存代理的一部分。

请求时使用Cache-Control 表示缓存的使用策略。

请求头里的no-cache表示浏览器不想读缓存,并不是说没有缓存。一般在浏览器按ctrl+F5强制刷新时,请求头里就有这个no-cache,也就是跳过强缓存和协商缓存阶段,直接请求服务器。(如果直接按F5的话,请求头是max-age=0,只跳过强缓存,但进行协商缓存)
而响应头max-age=259200 ,不太清楚,没验证出来

http://bbs.csdn.net/topics/391022213

There may be any number of intermediate proxies between the client and server which do caching. The client can explicitly request explicit caching behaviour from any and all caching entities, things like:

  • max-age - "I don't want a response older than X"
  • no-cache - "I want a fresh response"
  • no-transform - "I don't want it unless it's the original"
  • only-if-cached - "Don't bother the origin server if you don't have it already"

As with all requests, servers have a certain leeway in whether to honour the request or not. Just because a client insists on an uncached response doesn't mean it's necessarily going to get it.

https://stackoverflow.com/questions/42652931/why-use-cache-control-header-in-request

Cache-Control: no-cache is generally used in a request header (sent from web browser to server) to force validation of the resource in the intermediate proxies. If the client doesn't send this request to the server, intermediate proxies will return a copy of the content if it is fresh (has not expired according to Expire or max-age fields). Cache-Control directs these proxies to revalidate the copy even if it is fresh.

https://stackoverflow.com/questions/14541077/why-is-cache-control-attribute-sent-in-request-header-client-to-server

Why use Cache-Control header in request?的更多相关文章

  1. [转]ASP.NET Core: Static Files cache control using HTTP Headers

    本文转自:https://www.ryadel.com/en/asp-net-core-static-files-cache-control-using-http-headers/ Every sea ...

  2. 网站 cache control 最佳实践

    推荐阅读: 2020年软件开发趋势 高并发案例 - 库存超发问题 负载均衡的分类及算法 异地多活架构 Postman 的替代品来了 有时,当第二次访问网站时,看起来比较怪,样式不正常. 通常,是因为 ...

  3. axios token header response request http拦截器 axios实现登录、拦截、登出

    axios token header response request http拦截器 axios实现登录.拦截.登出 一个项目学会前端实现登录拦截 https://github.com/superm ...

  4. Header的Request部分和Response部分

    转载:https://zh.wikipedia.org/wiki/HTTP%E5%A4%B4%E5%AD%97%E6%AE%B5#%E8%AF%B7%E6%B1%82%E5%AD%97%E6%AE%B ...

  5. spring cloud Bug之was unable to refresh its cache! status = Cannot execute request on any known server

    可能原因: 1.application.yml server: port: 10001spring: application: name: microservice-consumer-movieeur ...

  6. was unable to refresh its cache! status = Cannot execute request on any known server

    出现这种错误是因为: Eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为. 在 yml中设置 eureka.client.register-with-eu ...

  7. 使用 IntraWeb (39) - THttpRequest、THttpReply

    在其它服务器脚本语言中熟悉的 Request.Response(THttpRequest.THttpReply) 在 IntraWeb 中算是幕后英雄了, 用户基本不需要直接操作它们了. IW 默认 ...

  8. Squid调试和故障处理

    http://blog.zhdata.com/tag/squid第16章 调试和故障处理 16.1 一些通用问题 在讨论通用debug前,我先提起一些经常发生的问题. 16.1.1 “Failed t ...

  9. lnmp架构实现动态php

    目录 LNMP动态网站php 1.PHP-FastCGI概述 PHP-FPM安装配置 配置PHP与数据库连接 配置PHP新增扩展模块 配置PHP-FPM主要配置 配置PHP-FPM错误日志 1.编译安 ...

随机推荐

  1. 如何删除电脑中使用过的COM端口

    打开注册表编辑器:开始--运行中输入regedit就可以了 打开注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arb ...

  2. [bzoj2213][Poi2011]Difference_动态规划

    Difference bzoj-2213 Poi-2011 题目大意:已知一个长度为n的由小写字母组成的字符串,求其中连续的一段,满足该段中出现最多的字母出现的个数减去该段中出现最少的字母出现的个数最 ...

  3. 洛谷 P2915 [USACO08NOV]奶牛混合起来Mixed Up Cows

    P2915 [USACO08NOV]奶牛混合起来Mixed Up Cows 题目描述 Each of Farmer John's N (4 <= N <= 16) cows has a u ...

  4. Spring Boot使用thymeleaf模板时报异常:template might not exist or might not be accessible by any of the configured Template Resolvers

    错误如下: template might not exist or might not be accessible by any of the configured Template Resolver ...

  5. Bootstrap基础--文本对齐风格

    在排版中离不开文本的对齐方式.在CSS中常常使用text-align来实现文本的对齐风格的设置.其中主要有四种风格: ☑  左对齐,取值left ☑  居中对齐,取值center ☑  右对齐,取值r ...

  6. /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Err

    /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Err ...

  7. Android中检測字符编码(GB2312,ASCII,UTF8,UNICODE,TOTAL——ENCODINGS)方法(一)

    package com.android.filebrowser;   import java.io.*; import java.net.*;   public class FileEncodingD ...

  8. 查找存在某字符的文件列表,不包括svn文件

    find . ! -wholename '*.svn*' -print | xargs grep "img" | awk -F ':.' '{print $1}' | uniq

  9. 使用ALSA编写自己的音频程序【转】

    本文转载自:http://blog.csdn.net/beyondioi/article/details/6994548 Alsa是Linux高级音频接口.面对众多的音频设备,Alsa为Linux音频 ...

  10. bazel编译tensorflow 生成libtensorflow_inference.so 和 libandroid_tensorflow_inference_java.jar

    bazel build -c opt //tensorflow/contrib/android:libtensorflow_inference.so --crosstool_top=//externa ...