View Full Version : Ajax Rotating Includes Script - Can I preload a page?

03-14-2006, 12:45 AM
In the Ajax Rotating Includes Script when you enter the page hosting this script your content area is blank, and on your example you have the text "Choose a page to load."

Is there a way to have one of your pages display as the hosting page loads? I want people to enter my site and see these pages and then flip to other pages if they want, rather than starting out from a blank slate.


03-14-2006, 01:45 AM
I am using Frontpage, so I can set an include page for that cell and as the page loads it will have that page visible, but when the other links are chosen the cell then updates to the new page.

I would still be interested in a better way if anyone knows of any.

Thanks. :)

03-14-2006, 05:35 AM
That actually sounds like a very good way to do it.

03-14-2006, 09:19 AM
Well, the problem with using Ajax rotating includes script (http://www.dynamicdrive.com/dynamicindex17/ajaxrotate.htm) to preload a page is that the process isn't asynchronous, but synchronous. In other words, the browser needs to wait until the "preloaded" page is loaded before it continues to load the rest of the main page currently being viewed. The reason we made it synchronous is so that any JavaScript or CSS on the page to fetch is loaded properly as well, which asynchronous has problem doing.

With that said then, you're better off just using a SSI includes (or some other server side inclusion method like PHP include) to prefetch a page and hiding it (ie: set visibility="hidden") until when you want to activate it. The process is synchronous as well, but faster as it's done on the server side. The AJax includes script was created for people to use on pages that don't support SSI or some other way of dynamically including a page to show.

03-17-2006, 12:49 AM
Here is a sample of what I am trying to do.


The page loads using a FrontPage include in the cell for my first selection. This is far from done, but it looks like it is going to work for what I am trying to accomplish.