You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fetching an external image, jit now issues 2 HTTP 200 responses before sending the 304. Here's why:
The modified time and etag are calculated with a 2nd http request to get the headers (I wonder why, more on that later)
I've added things to use the filemtime of the cache file, which then creates new last modified and etag (so our logic fails)
You then get a proper 304.
I wanted to be able to server the cache from the external server #130 and #136
The two request are shaped like this:
The first one requests the whole file, skipping the headers
The second one only request the headers. Based on libcurl's documentation, doing so sends a HEAD http request and should (if the remote server's smart enough) only sends headers...
I can't seem to figure out how we can get rid of one or the other, but I think we should never do both, as it's the way right now. Should we:
Do the HEAD request always, to make sure the cache is valid ? What about servers that do not return cache headers ?
Store this info in the DB, to be able to regenerate the original etag ?
Give up ? I mean, this behavior occurs only for the first person to hit the url, since all others will get the cache and never see the original response ?
Change our we cache external images ?
The more I think about it, the more I want performance. The simplest thing would be to number 4 including the following:
When fetching an external image, jit now issues 2 HTTP 200 responses before sending the 304. Here's why:
I wanted to be able to server the cache from the external server #130 and #136
The two request are shaped like this:
I can't seem to figure out how we can get rid of one or the other, but I think we should never do both, as it's the way right now. Should we:
The more I think about it, the more I want performance. The simplest thing would be to number 4 including the following:
Never cache external images that do not send proper cache headers ?See Proposition: Never cache external images that do not send proper cache headers #139