Topic: Image Gallery Cache Problem - overwriting 'same' existing file names

Hi guys

I have created a gallery for my photography website which works fine. Sometimes i need to update upto 5 images out of the 15 that are in the gallery.

So instead of recreating the entire gallery via JuiceBox Pro what i do is manually save these images with the same file names that i want to replace within the 'images' and 'thumbs' folders on my server respectively.

However upon refreshing the browser the images do not seem to change. I have tried re-loading them via another browser and i still have the same problem (because i have previewed the gallery before). Only if i clear my cache does it work. Some clients and friends have also noticed parts of the galleries do not update from the previous state they last saw.

For example, a couple who viewed their wedding photos once and wanted a few images swapped around are not able to see the changes even after hard refreshing and after closing the browser.

Surely i can't ask all my visitors to clear the cache of their browsers?

I have been using JuiceBox Pro v1.1.1 and have just downloaded v.1.2.0. I doubt this would make a change as i cannot see a fix for this in the update history.

I really like JuiceBox, however this is being a real problem now and i would appreciate any help with this.

Cheers

Re: Image Gallery Cache Problem - overwriting 'same' existing file names

The fact that browsers cache files is part of the functionality of the browsers themselves (rather than Juicebox-Pro).

If you wish to prevent browsers from caching your gallery's XML file (so that the current 'config.xml' file is always fetched from your web server), then try defining your gallery's XML file with a unique identifier (e.g. the current time which will be different each time the browser loads the page) using the configUrl option in your gallery's embedding code.

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
    new juicebox({
        containerId : 'juicebox-container',
        configUrl : 'config.xml?nocache=' + new Date().getTime()
    });
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

You could then edit your gallery with JuiceboxBuilder-Pro and add your new images with new filenames (and remove any unwanted images) via the 'Images' tab.

You should no longer experience a caching problem.