为什么我的 AJAX 结果不是 ETag-cached(不是 If-None-Match)?

Why is my AJAX result not ETag-cached (no If-None-Match)?

这是我的 AJAX 函数:

function ajax(url, data) {
    return new Promise((resolve, reject) => {
        $.ajax({
            url: "https://xxx",
            data: data,
            method: 'POST',
            timeout: 50000,
            cache: true,
            ifModified: true,
            crossDomain: true,
            success: (data, textStatus, jqXHR) => {
                if (data == '@fail@') reject(data);
                else {resolve(data);}
            },
            error: (jqXHR, textStatus, errorThrown) => {
                reject(errorThrown);
            }
        });
    });
}

正如在 Chrome -> 网络 (F12) 中观察到的,这是来自服务器的响应 header:

HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Content-Length: 3
ETag: W/"3-R7zlx09Yn0hn29V+nKn4CA"
Date: Fri, 06 Apr 2018 11:39:41 GMT
Connection: keep-alive

请求 header 始终相同,即使在后续调用中也是如此:

POST /register HTTP/1.1
Host: xxx:60001
Connection: keep-alive
Content-Length: 0
Accept: */*
Origin: http://localhost:8000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Referer: http://localhost:8000/index.html
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

不应该 Chrome,在收到 ETag header 后,缓存资源并在后续调用中设置 'If-None-Match' header 相同 URL?由于 returned 内容相同,我不应该获得状态代码 304 而不是 200 吗?

对其他服务器(例如 Google 地图服务器中的资源的调用有时会执行 return 304。

This 确认缓存通常仅限于 GET 请求方法:

However, common HTTP caches are typically limited to caching responses to GET and may decline other methods. The primary cache key consists of the request method and target URI (oftentimes only the URI is used as only GET requests are caching targets)

这在a post in Whosebug here中也得到了证实。