Page sometimes not rendered before onload event of BODY fires.




16 years ago
15 years ago


(Reporter: Steve Catmull, Assigned: Marc Attinasi)


Windows 2000

Firefox Tracking Flags

(Not tracked)




(1 attachment)



16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a) Gecko/20020611
BuildID:    2002061104

There are some circumstances where a page is not visually rendered before the
ONLOAD event fires.  The files attached to this case will demonstrate.

Basically, my goal is to display a "Please wait" page while the next page 
loads.  Sometimes that page load time is fractional of a second and other times
it is more lengthy.

There are circumstances that seem to be time sensitive where the page does not
show up or get rendered.  I know the "please wait" page is being processed
because if I put an onunload event or a JavaScript alert anywhere in the page,
it shows up in all its glory.

Reproducible: Always
Steps to Reproduce:
1.  Take the two files attached to this bug (note, PHP is required to execute
the second only to simulate a timed delay.  Substitute as necessary).
2.  Execute the test.html and on my machine if I set the sleep() value to 1, the
page does not show.  If I change the sleep value to 2, the "please wait" page
does show.

In Internet Explorer, it shows all of the time regardless of any delay.

Actual Results:  With a sleep delay of 1 (or less), the "Please wait" page was
not rendered.

Expected Results:  I should have seen at least a flash of red (purposely made
bright to be visible).

Running on a 600 Mhz P3 machine with plenty of memory.  I should note that I saw
some interesting behavior in that if I shut the browser completely down and then
loaded it, most often the first page load would show the "please wait"
regardless of the sleep in the second page.

Also, I set my disk and memory cache to 1k to try and explain that result, but
saw no appreciable difference.

Comment 1

16 years ago
Created attachment 87580 [details]
Two test files that illustrate the problem.  

This is the attachment referenced in the bug report.


16 years ago
Attachment #87580 - Attachment mime type: application/octet-stream → application/zip

Comment 2

15 years ago
It might be caused by JavaScript error in onload(). Go to Tools->Web
Development-> Javascript COnsole and see if there're any errors reported?

Similar thing happens with this example:

There's an error in onLoad Javascript piece, and the execuion halts, thus
stopping the rendering.

Comment 3

15 years ago
What kind of event is "odnunload" ?
<body onload="location.href=''" odnunload="alert('goodbye f
rom next');">

<body onload="javascript:location.href='nextpage.php'" ondunload="alert('goodb
ye from test');">

WFM after correcting the typo (onunload)
Resolving invalid for now, correct me if I'm wrong.
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.