• hbee

    (@heatherbodlak)


    Hi! I have a page set up where the client can upload some images to replace/update periodically (using the overwrite option, when files have the same name).
    Thing is, they keep contacting me because they upload the image successfully, but still see the old image unless they re-load the page…
    Is there a way to prevent the images from being cached? so that simply re-visiting the page, the new image loads, without having to press F5?
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nickboss

    (@nickboss)

    Hi, what do you mean “still see the old image”? Is there a file viewer on the page?

    Regards

    Nickolas

    Thread Starter hbee

    (@heatherbodlak)

    Hi!
    There is a page for example that displays “image_A.jpg”
    Using the plugin I set up a page for the client to upload the image via a simple “upload file” Field, where they upload the new image with the same exact filename, so that it overwrites the file with the same name.
    Thing is, when going to that page that displays “image_A.jpg”, the old image still shows until the user re-loads the page. And I assume this is just because the browser has stored that image in the cache.
    So I just wonder if there is a way to configure it so that images aren’t stored in the cache.
    Thank you

    Plugin Author nickboss

    (@nickboss)

    Hi, so let me see if I have understood well:

    1. The user opens in tab A the page with image_A. He sees the image.
    2. The user opens in a new tab B the page with the upload form and uploads a new image, replacing image_A.

    You want tab A to update automatically without reloading?

    Nickolas

    Thread Starter hbee

    (@heatherbodlak)

    Yes! So that When he Uploads the image and then checks the page again ir loads the New image without hsving to do a F5+ENTER

    Thread Starter hbee

    (@heatherbodlak)

    I mean, when that tab is revisted for the new image to be called, not the cached image

    • This reply was modified 4 years, 4 months ago by hbee.
    Plugin Author nickboss

    (@nickboss)

    Well it doesn’t have to do with caching. This is how web pages work. When you load one page, it doesn’t update by its own if something has changed in between. You will see the changes only if you reload the page.

    What you ask requires that the page with image_A has some sort of auto-update mechanism (e.g. every second) that checks if image_A has changed and updates it.

    Thread Starter hbee

    (@heatherbodlak)

    Oh I don’t mean for it to automatically update, I understand the page has to be reloaded – but in our case it only updates if I press F5+enter, not just enter. So my client kept thinking he hasn’t updated the file correctly (when in fact he did).
    It’s ok though! I just thought perhaps there was a way to set a limit on how long images are cached.

    Plugin Author nickboss

    (@nickboss)

    Oh ok I see sorry. The plugin does not cache the uploaded images. They should be updated right after their upload.

    Are you using any cache plugin? If yes, maybe you should consider excluding the page with image_A from caching.

    Nickolas

    Thread Starter hbee

    (@heatherbodlak)

    Are you using any cache plugin? If yes, maybe you should consider excluding the page with image_A from caching

    Aha! That’s what I should definitely look into then. Thank you!!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘prevent image from being stored in cache’ is closed to new replies.