Topic: Auto-refresh of gallery.xml?

In the next month, I'm going to be adding new images frequently to a group's gallery page. I want them (and me) to be able to go to the online page and see the new photos... without them having to delete their browser cache to clear the xml data. Is there some code I can add to the xml or index page that would automatically refresh the gallery.xml?
Thanks in advance
Mick

Re: Auto-refresh of gallery.xml?

You should be able to prevent browsers from caching your gallery's XML file by using the galleryURL flashvar option in your gallery's embedding code (in the 'index.html' file) and adding a unique query string element to it (such as the current time) so that the XML file's URL is different each time the gallery is viewed and the browser is forced to fetch it from the web server. Your embedding code would look something like this:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.galleryURL="gallery.xml?nocache=" + new Date().getTime();
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: Auto-refresh of gallery.xml?

Thank you so much for the solution!  smile