Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 11-http/lab/explore.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ nothing). The file contains some standard HTTP:

HTTP/1.1 200 OK
Content-type: text/plain
Content-length: 18
Content-length: 16
Connection: close

Hello over HTTP!
Expand Down Expand Up @@ -145,3 +145,4 @@ Rename the file to `two.html5` (I'll explain why in a second) and restart the se
Why did you have to rename the file? Because the browser will otherwise try and be clever if it thinks you're trying to access a file that you've just downloaded already. The server sends a `Last-modified` header, and if the browser notices you're asking for a file you have just downloaded, with the same timestamp as the HTTP header indicates, then your browser might ignore the rest of the request and not see that another header has changed. Changing the file name forces the browser to look again, as it thinks it's a different file now. Deleting the downloaded file, or editing the file on the server, would both have the same effect.

There is a moral here: if you're doing web development, and you are trying to find out why a change you made isn't showing in the browser (even if you refresh the page), it might be a cache problem. On the network tab of the developer tools window, there should be a checkbox to "disable cache" which you might want to turn on in this case and reload the page again, to exclude the cache as the possible source of the problem.