User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 374,191 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,524 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 815 | Replies: 4
Reply
Join Date: Feb 2008
Posts: 271
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz in Training

loading page objects

  #1  
Apr 23rd, 2008
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2005
Posts: 611
Reputation: digital-ether will become famous soon enough digital-ether will become famous soon enough 
Rep Power: 5
Solved Threads: 38
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Re: loading page objects

  #2  
Apr 24th, 2008
Originally Posted by kevin wood View Post
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...
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Join Date: Feb 2008
Posts: 271
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz in Training

Re: loading page objects

  #3  
Apr 24th, 2008
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.
Reply With Quote  
Join Date: Sep 2005
Posts: 611
Reputation: digital-ether will become famous soon enough digital-ether will become famous soon enough 
Rep Power: 5
Solved Threads: 38
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Re: loading page objects

  #4  
Apr 24th, 2008
Originally Posted by kevin wood View Post
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...avascript-fast
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Join Date: Feb 2008
Posts: 271
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz in Training

Re: loading page objects

  #5  
Apr 25th, 2008
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 4:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC