![]() If the user hammers F5, they'll keep getting the cached version for 15 seconds. But I'm perfectly willing to let the user cache the homepage for 15 seconds: 200 OK If I'm building a page on the fly, there is no date associated with it - it's now. Not everything on the server has a date associated with it. Your browser did have to suffer the round-trip delay of sending a request to the server, and waiting for the response, but it did save having to re-download the static content. Rather than sending the client 200 OK, followed by the contents of the page, it instead tells you that your cached version is good: 304 Not Modified The server receives the request, realizes that the client has the most recent version already. It will ask the server for the file, but instruct the server to only send the file if it has been modified since 6 3:13:38: GET / HTTP/1.1 they forgot to include E-Tag (so the browser can do a conditional request)īut they did include a Last-Modified date in the response: Last-Modified: Tue, 03:13:38 GMTīecause the browser knows the date the file was modified, it can perform a conditional request.they forgot to include Max-Age (so the browser knows how long the cached item is good for).they forgot to include Expires (so the browser knows to use the cached copy until that date).only on your own local machine):īut the server forgot to include any sort of caching hints: the item should only be cached in a private cache, i.e. ![]() The server kindly asked any intermediate proxies to not cache the contents (i.e. To answer your question about why caching is working, even though the web-server didn't include the headers:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |