9 ms·
still need to check if file is changed, hence 304 http status code.
by perlpimp 11y ago
still need to check if file is changed, hence 304 http status code.
- SahAssar 11y agoThat depends on what type of caching headers the CDN uses. If it uses max-age and no etags/last-modified the browser won't send the if-modified-since request and just use the cached resource without asking the server.
- mike-cardwell 11y agoIf the server sends an "Expires" header in the response, then the client doesn't even need to do that check. With an expires header, the server has effectively told the client that the data wont change until at least a particular date, and so the client honours that information. Last-Modified/If-Modified-Since is an optimisation trick which exists for the situation where the person running the website hasn't bothered to explicitly define expiry periods for content.