XML Flash Slideshow v4 Help    |    Support Home    |    DWUser.com Home  Download Help PDF (29MB)    |    Search:

Preloading the SWF File

In order to provide the fastest possible load time to your users, you can preload the SWF file on pages which don't have slideshows.    As users browse your site, the SWF will quietly load in the background.    Then, when the users visit page(s) with slideshows, the slideshow will appear instantly because the SWF file will be stored in the user's temporary internet cache.    After the slideshow SWF file has been loaded or preloaded once, it will appear instantly on all subsequent requests.  The method shown below will not affect the performance of your other pages in any way; all loading takes place after the rest of the document has loaded, while the user is browsing the page.

This method should generally only be used on sites where slideshows are a central feature of the site and most users will view one.    If users don't ever view a slideshow, preloading the slideshow SWF will use unnecessary bandwidth on your server.

Creating the Special Preloader Page

To setup preloading, first create a new special HTML page.    Save it as something like slideshow_preloader.html , putting it in an easily accessible directory.    It is best if you save it in the same folder as the pages where you want to add preloading capabilities.  In this page, insert a new slideshow.    Only add a single empty image gallery, and set the slideshow dimensions to 10 x 10 (or some other very small size).    Set the 'Slideshow Type - Pro or Basic' setting in the Global Configuration and Playback Settings section to be the same as your other slideshows.    If you use both types, insert a second empty slideshow which uses the other Slideshow Type setting.

Enabling Preloading on an Existing Page

Important: Only enable preloading on pages without slideshows.    For example, if your site has a 'home' page and a 'galleries' page, you would place the preloading page only on the 'home' page.

Open the page to which you want to add preloading and switch to code view.  At the end of the document, just before the closing </body> tag, add the following code:


You must replace the RELATIVE_PATH_TO_PRELOAD_PAGE_HERE code with the actual relative path from the current page to the earlier-created preloader page.    The line should look something like this after being updated:

var preloadPage = "slideshow_preloader.html";

Now, once the page finishes loading and the user is browsing, the slideshow SWF file(s) will load silently in the background.    You can add the preloading code to only one page, or many pages -- just make sure to specify the correct path to the preloader page each time.