Topic: Prevent caching

I would like to prevent browsers from caching my JBB Pro web pages. I know how to do it with meta tags but every time I regenerate the page I have to add these tags manually. Is there a way to automate this?

Re: Prevent caching

If you are using JuiceboxBuilder-Pro to create your galleries and use the 'index.html' pages that Juiceboxuilder-Pro generates, then you can add your custom <meta> tags to the template file that JuiceboxBuilder-Pro uses to generate the 'index.html' pages.

Here's the file that you'll need to modify:
Mac: /Applications/JuiceboxBuilder-Pro.app/Contents/Resources/template/index.html
Windows: C:\Program Files (x86)\JuiceboxBuilder-Pro\template\index.html

Open the file in a plain text editor and add your custom <meta> tags somewhere between the <head> and </head> tags.

If you want to prevent browsers from caching your gallery's XML file, 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.

In the 'index.html' template file (location above), add the following code on a line of its own immediately after line 27 (new juicebox({).

configUrl: 'config.xml?nocache=' + new Date().getTime(),