Заголовки управления кешем с IIS 7.5

chmod 644 - gives rw-r-r
chmod 755 - givex rwx-rx-rx

006 это будет бесполезно..., так как пользователь и группа не могут считать файл, но позволяют, все, чтобы читать и записать - возможно, являются наоборот 600

chmod 006 - gives - - rw
chmod 600 - gives rw- -
1
задан 8 December 2012 в 00:28
1 ответ

One way to understand client/user agent caching is to view the browser as implementing an intermediate cache for itself (which in fact it does, addressed by Cache-Control: private). This abstracts all the terminology to simple patterns of request and response, and in most cases the browser cache behaves the same as a proxy or intermediate cache. Keeping this in mind is helpful when reading the authoritative documentation on the subject in IETF RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

  1. Set the "Expires" header to "Immediately" (which sends Cache-Control: no-cache) as described at http://technet.microsoft.com/en-us/library/cc770661(v=ws.10).aspx and http://msdn.microsoft.com/en-us/library/ms689443(v=vs.90).aspx.

  2. No. If you don't send any Cache-Control headers, IIS should send the latest version of the resource and a client should recognize that from either the Last-Modified header or the ETag.

  3. Your first statement is correct: sending no-cache will instruct the client to request the resource every time, even if it has already cached it. Some clients misbehave and cache such resources anyway, but you can also use must-revalidate to ensure that it gets a fresh copy

As for best practices, how long you cache depends on your application and users' needs. You can always send Cache-Control: must-revalidate to solve the issues mentioned, so there is no need to globally change your cache expiration.

2
ответ дан 3 December 2019 в 21:39

Теги

Похожие вопросы