Edge ignores HTTP Cache-control: no-cache header in request

Confirmed Issue #10739540 • Assigned to Nicolas A.

Details

Author
Andreas B.
Created
Jan 31, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

When I issue an XMLHTTPRequest that has the “Cache-control: no-cache” flag set in the HTTP request, Edge is ignoring it and serving the response from the internal cache (I verified with a network scanner and really NO request is being sent out). With other browsers (CHrome, Firefox) the same request is not gonna cached.

This is the request how it looks like when it’s not cached. I recorded it with a proxy tool (Fiddler).

GET http://192.168.2.61/abc.json HTTP/1.1
Cache-Control: no-cache, max-age=0
Accept: application/json, text/plain, */*
Authorization: a43f1906c
Referer: http://192.168.2.61/index.html
Accept-Language: de-DE
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
If-Modified-Since: Tue, 31 Jan 2017 09:28:20 GMT
Host: 192.168.2.61
Connection: Keep-Alive

Along with the response

HTTP/1.1 200 OK
Server: WindRiver-WebServer/4.9
Connection: Keep-Alive
Keep-Alive: 
Persist: 
Content-Length: 4293
Last-Modified: TUE JAN 31 09:37:06 2017
Content-Type: text/html

{ ...... Some JSON Stuff ..... }

Subsequent calls to the same function (doing the same HTTP call) are not sent to the web server. They are internally answered from edges cache without any interaction with the webserver - although the request header clearly tells not to do so.

Attachments

0 attachments

    Comments and activity

    • The URL to the HTTP standard document:
      http://tools.ietf.org/html/rfc7234#section-5.2.1.4

    • I also tried it with

      "Cache-Control: no-cache, max-age=0, no-store"
      

      … yet Edge still serves from the cache, totally ignoring the Cache-control header.

      But there is some light. The old

      Pragma: no-cache
      

      did the trick. Obviously Edge does only implement HTTP 1.0 caching. HTTP 1.1 clearly states that this is just still there for backward compatibility, and it must be ignored if Cache-Control headers are present:

      The "Pragma" header field allows backwards compatibility with
      HTTP/1.0 caches, so that clients can specify a "no-cache" request
      that they will understand (as Cache-Control was not defined until
      HTTP/1.1).  When the Cache-Control header field is also present and
      understood in a request, Pragma is ignored.
      

      I’m curious if someone @MS is willing to implement a modern HTTP 1.1 compliant browser some day…

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To from “Brad E.” to “Scott W.”

      Changed Assigned To from “Scott W.” to “Nicolas A.”

      Changed Status to “Confirmed”

    • Tests at:
      https://github.com/mnot/web-platform-tests/blob/http-cache/fetch/http-cache/cc-request.html

      Edge insider edition appears to only pay attention to Cache-Control: no-cache and no-store; min-fresh, max-stale, only-if-cached and max-age are ignored.

      Firefox implements all except only-if-cached.

    You need to sign in to your Microsoft account to add a comment.

    Sign in