is there a script that will load the all the page objects before the next page is connected to.

i have a flash menu and i want it to load up on to the server and then not have to be reloaded every time a new page is entered/accessed.

is there a script that will load the all the page objects before the next page is connected to.

i have a flash menu and i want it to load up on to the server and then not have to be reloaded every time a new page is entered/accessed.

Do you mean load up on the browser? You will have to at least transfer it once to the browser, then make sure the browser caches it.

You could preload stuff in another page by fetching it into an IFRAME or better using XMLHttpRequest since it doesn't show the loading bar.

I don't see how you could just load the flash menu, unless it had a unique URL. You'd have to load a page, and hope the flash menu gets cached in the process...

thanks for the reply for this and for the php question earlier that is working it looks like anyway just got to do some more test in the morning.

i did mean cached sorry. on the home page i have proloaded all the images and the menu into the cache but it has no effect on the menu. once all the pages have been loaded once the menu shows up pretty quickly but the first time they are entered it takes sometimes a long time for them to load.

if i used an iframe with no size could an loaded the other pages into this on the home page without it having any large effect on the loading time of the page.

thanks for the reply for this and for the php question earlier that is working it looks like anyway just got to do some more test in the morning.

i did mean cached sorry. on the home page i have proloaded all the images and the menu into the cache but it has no effect on the menu. once all the pages have been loaded once the menu shows up pretty quickly but the first time they are entered it takes sometimes a long time for them to load.

if i used an iframe with no size could an loaded the other pages into this on the home page without it having any large effect on the loading time of the page.

With an iframe the user will still see the loading bar at the bottom. However, if you put the iframe right at the bottom of the page, before the </body> closing tag, your page will be rendered in the browser.

If you use XMLHttpRequest, your users wont see the page loading in the background. The user will have to stay on the page for the length of the time it takes to load other stuff, or it will be useless.

a bit OffTopic:

You can greatly optimize your pages with a few rules:

1) Reduce the number of HTTP request required for each page. Each image, flash object, etc. is a new HTTP request. HTTP requests are limited to 2 at a time, so the browser has to wait for the current two to complete before loading more stuff.

2) Reduce the weight of your pages. You could minify your HTML, JavaScript and CSS using available compression tools. eg: http://aciddrop.com/php-speedy/. or http://code.google.com/p/minify/wiki/UserGuide or http://en.wikipedia.org/wiki/Minify

This includes Gzipping your content, which Apache can do for you. You can also optimize your images and your flash, another matter altogether..

3) Load static files from a different domain. If you save your static files on a different domain, you open up 4 HTTP requests at a time for your page (2 per domain). It could even be on a subdomain that points to the same IP, the browser still considers it a separate domain.

4) Reduce DNS queries. Try and keep the number of different domains you load files from at a minimum of 3-4. If you add more, they normally just add more time to your downloads.

5) Cache all static content. Make sure all your static content is cached for the time you want. A good reference on this is: http://www.thinkvitamin.com/features/webapps/serving-javascript-fast

thanks for the reply it was really helpful i will have a look minifying the code and the xmlhttprequest. I have used this on another project before just not in this way.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.