MayhemYDG/4chan-x — comment on commit 0a6e01accdb04ac71be0d26d4477abb7efe7a6e1
File:  line 0
By MayhemYDG:

Before sending the `If-Modified-Since` header the status code would always be `200` even if in the network panel you'd see `304`, and it would always give the full html response.
Picture related http://i.imgur.com/N6vlA.png

If the page has been modified since the given value, you'll get a response AND the 200 status code, or 404, or anything but 304.
Otherwise it won't give you anything but the 304 code.

It doesn't force the page to be downloaded though, browsers seem to load from the cache sometimes for some obscure reasons.
So fooling the cache is still necessary, but it doesn't perturbate the `If-Modified-Since` request.

>also why listen to onreadystatechange? r.onload = r.error = cb seems nicer

Because using a single event listener seems nicer than using two.