Loading ...
Sorry, an error occurred while loading the content.

Cache-Control and Pragma

Expand Messages
  • Nottingham, Mark (Australia)
    I can t find anything in the Draft that addresses the situation when both Cache-Control and Pragma: no-cache headers are set, and they are in conflict. For
    Message 1 of 6 , Dec 9, 1998
    • 0 Attachment
      I can't find anything in the Draft that addresses the situation when
      both Cache-Control and Pragma: no-cache headers are set, and they are in
      conflict.
      For instance, if I use

      Cache-Control: must-revalidate
      Pragma: no-cache

      on a HTTP response, it would be desireable to have it cached (and always
      revalidated) by HTTP 1.1 caches, and not cached by HTTP 1.0 caches.
      However, I can see nothing in the Draft about this, and some
      implementations, upon reading 14.32 Pragma, might never cache the
      object. While the action is safe, it's not ideal.

      Am I missing something somewhere? Thanks.



      Mark Nottingham
      Internet Project Manager
      Merrill Lynch - Melbourne, Australia
    • Larry Masinter
      ... The interaction of headers whose interaction is not specified is not specified. An origin server cannot depend on the precedence of Cache-Control:
      Message 2 of 6 , Dec 10, 1998
      • 0 Attachment
        Mark Nottingham wrote:

        > I can't find anything in the Draft that addresses the situation when
        > both Cache-Control and Pragma: no-cache headers are set, and they are in
        > conflict.
        > For instance, if I use
        >
        > Cache-Control: must-revalidate
        > Pragma: no-cache
        >
        > on a HTTP response, it would be desireable to have it cached (and always
        > revalidated) by HTTP 1.1 caches, and not cached by HTTP 1.0 caches.
        > However, I can see nothing in the Draft about this, and some
        > implementations, upon reading 14.32 Pragma, might never cache the
        > object. While the action is safe, it's not ideal.
        >
        > Am I missing something somewhere? Thanks.

        The interaction of headers whose interaction is not specified
        is not specified.

        An origin server cannot depend on the precedence of
        "Cache-Control: must-revalidate" and "Pragma: no-cache",
        and a server (1.0 or 1.1) might ignore either or both.

        Larry
        --
        http://www.parc.xerox.com/masinter
      • Koen Holtman
        ... Just to add to this: the preferred method of making responses cachable by 1.1 caches and non-cachable by 1.0 caches is to combine Cache-Control: something
        Message 3 of 6 , Dec 10, 1998
        • 0 Attachment
          Larry Masinter:
          >
          >Mark Nottingham wrote:
          >
          >> I can't find anything in the Draft that addresses the situation when
          >> both Cache-Control and Pragma: no-cache headers are set, and they are in
          >> conflict.
          >> For instance, if I use
          >>
          >> Cache-Control: must-revalidate
          >> Pragma: no-cache
          >>
          >> on a HTTP response, it would be desireable to have it cached (and always
          >> revalidated) by HTTP 1.1 caches, and not cached by HTTP 1.0 caches.
          >> However, I can see nothing in the Draft about this, and some
          >> implementations, upon reading 14.32 Pragma, might never cache the
          >> object. While the action is safe, it's not ideal.
          >>
          >> Am I missing something somewhere? Thanks.
          >
          >The interaction of headers whose interaction is not specified
          >is not specified.
          >
          >An origin server cannot depend on the precedence of
          >"Cache-Control: must-revalidate" and "Pragma: no-cache",
          >and a server (1.0 or 1.1) might ignore either or both.

          Just to add to this: the preferred method of making responses cachable
          by 1.1 caches and non-cachable by 1.0 caches is to combine
          Cache-Control: something with Expires: <current time and date>. The
          interaction between these two _is_ specified.

          >
          >Larry

          Koen.
        • Jeffrey Mogul
          I can t find anything in the Draft that addresses the situation when both Cache-Control and Pragma: no-cache headers are set, and they are in conflict. For
          Message 4 of 6 , Dec 10, 1998
          • 0 Attachment
            I can't find anything in the Draft that addresses the situation
            when both Cache-Control and Pragma: no-cache headers are set, and
            they are in conflict.

            For instance, if I use

            Cache-Control: must-revalidate
            Pragma: no-cache

            on a HTTP response, it would be desireable to have it cached (and
            always revalidated) by HTTP 1.1 caches, and not cached by HTTP 1.0
            caches. However, I can see nothing in the Draft about this, and
            some implementations, upon reading 14.32 Pragma, might never cache
            the object. While the action is safe, it's not ideal.

            Am I missing something somewhere? Thanks.

            Larry Masinter (who writes that this is "not specified") and Koen (who
            points out that what you probably want to do is to send an Expires
            header) are both right.

            However, there is a subtle point that you and they both missed: the
            formal specification for "Pragma: no-cache" applies ONLY to request
            messages (in both HTTP/1.1 and in RFC1945); it has no formal definition
            for response messages.

            While it is possible that some caches do look at "Pragma" headers in
            responses, I don't know of any specific proxy software that does. I
            checked both Squid 1.1.20 and an ancient copy of the CERN server/proxy
            code; both would ignore "Pragma" headers in responses. So sending
            "Pragma: no-cache" in a response would probably be pointless,
            regardless of what the HTTP/1.1 specification says about its
            interaction with other headers.

            In retrospect, I think the wording of the specification of
            Pragma should have included a Note to this effect, because
            lots of people seem to be confused by this (even me, at times).
            But let's not delay the standardization process over this (non)issue!

            -Jeff
          • Anawat Chankhunthod
            ... Netcache from netapp does. Anawat
            Message 5 of 6 , Dec 10, 1998
            • 0 Attachment
              > While it is possible that some caches do look at "Pragma" headers in
              > responses, I don't know of any specific proxy software that does. I
              > checked both Squid 1.1.20 and an ancient copy of the CERN server/proxy

              Netcache from netapp does.

              Anawat
            • Nottingham, Mark (Australia)
              There seems to be a lot of references to Pragma: no-cache response headers out there, and they are in fairly common usage (I believe someone from Squid could
              Message 6 of 6 , Dec 10, 1998
              • 0 Attachment
                There seems to be a lot of references to Pragma: no-cache response
                headers out there, and they are in fairly common usage (I believe
                someone from Squid could give stats on what they've seen, probably). I
                believe that I was pointed to them by someone on this list a while back,
                so it might be worthwhile to (eventually) clear it up.

                BTW anawat, the behavior re: pragma and Cache-control that we were
                asking for will no longer be necessary ;-)


                > -----Original Message-----
                > From: chankhun@... [mailto:chankhun@...]
                > Sent: Friday, December 11, 1998 7:02 AM
                > To: mogul@...
                > Cc: mark_nottingham@...; http-wg@...
                > Subject: Re: Cache-Control and Pragma
                >
                >
                > > While it is possible that some caches do look at "Pragma" headers in
                > > responses, I don't know of any specific proxy software that does. I
                > > checked both Squid 1.1.20 and an ancient copy of the CERN
                > server/proxy
                >
                > Netcache from netapp does.
                >
                > Anawat
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.