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
 

Sucks pressing on the emoji picker and then the whole website times out because you spammed it. Also sucks waiting for it all to load.

There is a cache-control header but it doesn't seem to do anything... maybe there's missing etag or modified-since on those images? Aslan it should just be perma-cached.

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 1 year ago

emoji picker needs a huge facelift lol, you spend your entire rate limit struggling to scroll to the section you're looking for in the sea of blanks

[–] [email protected] 5 points 1 year ago

I thought we historically had some issues with perma-caching but yeah... obviously what we have now is fucked lol

[–] [email protected] 2 points 1 year ago

Looking at the headers and checking the docs, everything seems like it "should" work. I would bet it's some JS that isn't respecting the caching.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

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.