Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-19-2009, 06:51 AM   PM User | #1
hvg_99
New to the CF scene

 
Join Date: Feb 2009
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
hvg_99 is an unknown quantity at this point
A web page loading !!!help !!

Hi all,

How do you know that a web page is fully/completely loaded in a browser. Is there any content length in a header or what else will let you know.

Please help me...


hvg
hvg_99 is offline   Reply With Quote
Old 03-19-2009, 08:17 AM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Ther is no reliable way of knowing when a web page has finished loading into a user's browser. The content length is not helpful as the user may be on 56kbits/s dialup or 8mb broadband.



Quizmaster: The name of a Minister of Transport who gave his name to a type of pedestrian crossing was Leslie Hore- ... who?
Contestant: Pelican.
Philip M is offline   Reply With Quote
Old 03-19-2009, 03:38 PM   PM User | #3
freedom_razor
Regular Coder

 
Join Date: Dec 2008
Location: Tannhäuser Gate
Posts: 286
Thanks: 7
Thanked 58 Times in 57 Posts
freedom_razor is an unknown quantity at this point
Is ONLOAD unreliable?
freedom_razor is offline   Reply With Quote
Old 03-19-2009, 09:21 PM   PM User | #4
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
http://www.htmlcodetutorial.com/docu...DY_onLoad.html

Usage recommendation: use it, but don't rely on it.

I supposed that the OP was looking for some kind of "Loading" or progress bar.
Philip M is offline   Reply With Quote
Old 03-20-2009, 02:35 PM   PM User | #5
freedom_razor
Regular Coder

 
Join Date: Dec 2008
Location: Tannhäuser Gate
Posts: 286
Thanks: 7
Thanked 58 Times in 57 Posts
freedom_razor is an unknown quantity at this point
I think ''don't rely on it'' is more about the use of scripting with the event, and scripts can be just turned off, so you can't rely on them.
As for indicating when a page has finished loading, I reckon ONLOAD is fairly reliable
freedom_razor is offline   Reply With Quote
Old 03-20-2009, 02:55 PM   PM User | #6
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by freedom_razor View Post
I think ''don't rely on it'' is more about the use of scripting with the event, and scripts can be just turned off, so you can't rely on them.
As for indicating when a page has finished loading, I reckon ONLOAD is fairly reliable
With hindsight it would have been possible to give a better answer if the OP had indicated what he wished to achieve. Progress bar, start an animation, identify whether people abandon the page before it has finished loading due to impatience, or what?

I (perhaps wrongly) supposed that he wanted a progess bar which would turn off as soon as the page had finished loading. Which AFAIK cannot be done.

Last edited by Philip M; 03-20-2009 at 03:00 PM..
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:18 AM.


Advertisement
Log in to turn off these ads.