Hi Steven, here's a lot of description.
I decided to first try another approach. If caching were an issue I reasoned that if I could encompass more of the juicebox code with my custom code I would stand a better chance. So I eliminated the configURL option and, instead, used my php code to actually generate a real config.xml file and the juicebox declaration. My html file looks something like this (much simplified and only showing relavant code):
<script src="jb_gallery/jbcore/juicebox.js"></script>
<?php include("jb_gallery/config.php"); ?> <!-- for v1.4.4.2 -->
<div id="jb_container"></div>
This version of config.php creates a new config.xml file every time (with random images from server side) and the following juicebox code:
<script>new juicebox({
baseUrl : 'jb_gallery/',
containerId : 'jb_container',
galleryWidth: '350px',
galleryHeight: '350px',
backgroundColor: '#222222'
});</script>
This solution almost worked. The expand button worked just fine but when I repeatedly refreshed my browser page every once in a while the gallery didn’t display anything - it was just black and there was no rotating juicebox wheel. I suspect that there is some synchronization between the juicebox code and my server side calls that isn’t happening. Without further insight into this, such as a handshake condition between the juicebox code and my config.xml file generation, there doesn’t seem to be more that I can do in this direction.
You said that you could not replicate my problem with your random photo php generator code. But were you doing server side calls like me? I generate random photos via server side file system and data base access. When I was using 1.3.3 this worked perfectly: every time I refreshed the page I would get 8 new photos and every time I used the expand button I would expand those same 8 images. All browser settings were default and all sever side settings were default (no special cache instructions). If all I do is switch to 1.4.4.2 I get the aforementioned problem behavior with expand. What changed with juicebox?
I did play around with caching as this just may be the state of affairs with the newer editions of juicebox. With your code in my php file (using my original configURL option setting) the expand button works. If I continually refresh the page, occasionally I’ll get 8 new images; otherwise, it’s the same 8 images. Likewise I get this same behavior if I do “F5” or “Ctrl+F5”. In all cases expand works just fine but, ideally, I would like to get 8 new images consistently when I refresh like with 1.3.3.
Any ideas how I can make this work better? I do appreciate the help so let me know if you need more information.