Question Does Spigot forum not cache images?

Discussion in 'Community Feedback and Suggestions' started by Andre_601, Jun 24, 2021.

  1. Andre_601

    Supporter

    I've noticed that on one of my plugins, the images I implemented are always loaded again and again as if they're not cached in any way.

    Does the forum not cache images? Because this makes loading time of resource pages and any follow up actions (i.e. switching to discussion tab) unintentionally long.

    The resource in question is this one here and the images I use there for decoration always cause the loading time to be several seconds which is annoying and causes me to wait more than I should to f.e. post a resource update.

    I hope something can be done about this because it's quite frustrating.
     
  2. Seems more like that your browser does not cache those images. Caching is set to private with revalidation through etag.

    I'm wondering though why my browser does not cache this as well.
     
    #2 Janmm14, Jun 24, 2021
    Last edited: Jun 24, 2021
  3. [​IMG]
    Well from the look of the response header CF CDN is indeed caching the static resources (this one is one of your images in your resources). So yeah I guess like what Janmm14 said, check your local browser settings.
     

    Attached Files:

  4. Those are just resource icons. Check the images in the linked resource description. They have CF-Hit Dynamic (aka served from origin server)
     
  5. md_5

    Administrator Developer

    They can't be cached by cloudflare because they're attachments and thus subject to per-user permissions.

    As for caching in the browser, I presume the issue is that there is no max-age on the original.
     
  6. You are right -.- Should have double checked.
     
  7. Andre_601

    Supporter

    Any way to fix this in some way? It's rather annoying to have and I would love to hear any possible idea.
    Also, my browser does cache images as it's the default setting.
     
  8. Well on the top of my head I would say use some external image hosting services that uses CDN on its own. That might help speed things up depending on how spigot delivers attached images to users (I am not an expert on web dev)
     
    • Like Like x 1
  9. Just by comparing your resource with mine, the speed difference is notable.
    I would recommend uploading the resource icons and images to Imgur (or any other image host) and then display them using BBcode. That way they can load by proxy which seems way faster.
     
    • Agree Agree x 1