1

機密データを含むサイトがいくつかあるため、クライアント キャッシュを完全に無効にしたいと考えています。Google で Http/1.1 に使用される 3 つの実装があることがわかりました。

  • 実施1:他と「無店舗」を設定

    response.setHeader("Cache-Control", "no-store, no-cache, max-age=0, must-revalidate");
    
  • 実装 2: 「ストアなし、キャッシュなし」を設定する

    response.setHeader("Cache-Control", "no-store, no-cache");
    
    // REASON is "no-cache" already cover this "max-age=0, must-revalidate"
    
  • 実装 3: 「no-store」を設定します。

    response.setHeader("Cache-Control", "no-store");
    
    // REASON is: "no-store": data is never stored 
    // on both client cache & intermediate caches
    

この図を見つけました (Google サイトからのソース: Cache Control Policy Diagram )

キャッシュ制御ポリシーの図

この図から、私の理解では HTTP/1.1 には実装 3 で十分です。

コメントはありますか?ありがとう!

4

1 に答える 1