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.

  • StellarTabi [none/use name]
    ·
    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

  • ChaosMaterialist [he/him]
    ·
    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.

  • mathemachristian [he/him]
    ·
    edit-2
    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.