我试图对我的缓存策略有一个基本的行为:文件应该被缓存,并且每次都与服务器重新验证。所以我希望 Apache 发回 304。
这是每次浏览器刷新时发生的对话框:
Status Code:200 OK
Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Cookie: ...
Host:...
If-Modified-Since:Tue, 14 Oct 2014 15:10:37 GMT
If-None-Match:"1461-505636af08fcd-gzip"
User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
Response Headers
Accept-Ranges:bytes
Cache-Control:No-cache
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:1412
Content-Type:text/html
Date:Tue, 14 Oct 2014 16:58:05 GMT
ETag:"1461-505636af08fcd-gzip"
Keep-Alive:timeout=5, max=99
Last-Modified:Tue, 14 Oct 2014 15:10:37 GMT
Server:Apache/2.4.6 (Ubuntu)
Vary:Accept-Encoding
Run Code Online (Sandbox Code Playgroud)
(这是来自 chrome devtools,未选中禁用缓存)
您可以看到响应包含 Cache-Control:No-cache 标头,并且 If-modified-since 标头与 Last-modified 相匹配。ETag 也匹配。
在这种情况下,Apache 不应该发送 304 吗?
编辑
在 apache 中禁用 …
我们域中的现有用户可以使用 RDC 来控制 Windows 7 工作站。当我在 Active Directory 中创建一个用户,并将他们添加到远程桌面用户时,他们不能使用 RDC :
The connection was denied because the user account is not authorized for remote login.
Run Code Online (Sandbox Code Playgroud)
什么都试过了,想知道远程桌面控制的用户数有没有限制。
同样,作为“远程桌面用户”组成员的现有用户可以完美地使用它。
有什么建议吗?