this post was submitted on 06 Nov 2023
20 points (100.0% liked)
hexbear
10261 readers
2 users here now
Now that the old Hexbear fork has been officially abandoned, this community will be used as a space for meta-discussion on the site itself.
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm getting a 302 response for most of the emoji requests, with the image attached in the response body. It seems the emoji's are first fetched from **www.**hexbear.net, the server sends a "302 found" to hexbear.net (no www) with the image in the message body and no last-modified in the header. The redirected request returns 200 with a sensible last-modified and my browser therefore gets the content from the cache.
I believe the data actually displayed is from the cache, but the cache is only hit after the redirect response, which contains the full image, is processed.
Edit: I just saw some 302 requests return cached responses between pages but its rare. Meanwhile site data for hexbear has run away with 342MB with lemm.ee as a runner up using only 77MB. I think my browser is simply emptying the cache so it doesn't grow so big as to be pointless. The cached images from the 302 responses get deleted quicker probably, but eventually the other images must go as well.
Changing the emoji urls to remove the www can probably be done in the database and for any URL already in a comment it's probably not that big of a deal.
Also there is no max-age set as cache-control on the images returned, so they probably will get discarded rather quickly. At least on every full page load. Setting a large max-age and the immutable flag should resolve this issue I believe.