<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>170714</bug_id>
          
          <creation_ts>2017-04-10 21:48:48 -0700</creation_ts>
          <short_desc>HTTP cache does not honor a number of cache-control request directives</short_desc>
          <delta_ts>2022-05-19 15:26:55 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>Safari Technology Preview</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Nottingham">mnot</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>cdumez</cc>
    
    <cc>koivisto</cc>
    
    <cc>mike</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1296275</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Nottingham">mnot</who>
    <bug_when>2017-04-10 21:48:48 -0700</bug_when>
    <thetext>Safari Tech Preview&apos;s HTTP cache does not honour a number of cache-control request directives:

* If a request contains Cache-Control: max-age with a value other than &quot;0&quot;, Safari TP will reuse a stored response, even when the stored response is older
* If a request contains Cache-Control: max-age and the response contains an Age header that is greater than the requested value, Safari TP will reuse the cached response
* If a request contains Cache-Control: min-fresh, Safari TP will not honour its value
* If a request contains Cache-Control: no-store, Safari TP will still use a stored response
* If a request contains Cache-Control: only-if-cached, Safari TP will not generate a 504 response if it is not stored.

For tests, see:
  http://w3c-test.org/fetch/http-cache/cc-request.html

Probably the most concerning issue here is the lack of support for Cache-Control: no-store.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870435</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-05-19 10:13:04 -0700</bug_when>
    <thetext>(In reply to Mark Nottingham from comment #0)
&gt; For tests, see:
&gt;   http://w3c-test.org/fetch/http-cache/cc-request.html

Now http://wpt.live/fetch/http-cache/cc-request.any.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870436</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-19 10:13:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/93585414&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870441</commentid>
    <comment_count>3</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-05-19 10:17:49 -0700</bug_when>
    <thetext>-&gt; into Radar, given cache behaviour of Safari is owned by CFNetwork, and not WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870443</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-05-19 10:19:13 -0700</bug_when>
    <thetext>(In reply to Sam Sneddon [:gsnedders] from comment #3)
&gt; -&gt; into Radar, given cache behaviour of Safari is owned by CFNetwork, and
&gt; not WebKit.

That&apos;s not true. WebKit doesn&apos;t use CFNetwork for HTTP caching.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870546</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Nottingham">mnot</who>
    <bug_when>2022-05-19 15:26:55 -0700</bug_when>
    <thetext>In the meantime - we&apos;ve relaxed the requirement for caches to honour these:
  https://httpwg.org/http-core/draft-ietf-httpbis-cache-latest.html#cache-request-directive

(that will be published as an RFC any day now)

See tests also at:
  https://cache-tests.fyi/#cc-request</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>