Closed Bug 151649 Opened 22 years ago Closed 22 years ago

Page sometimes not rendered before onload event of BODY fires.

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: coscatmu, Assigned: attinasi)

References

()

Details

Attachments

(1 file)

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.
This is the attachment referenced in the bug report.
Attachment #87580 - Attachment mime type: application/octet-stream → application/zip
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:
http://bugzilla.mozilla.org/attachment.cgi?id=110403&action=view

There's an error in onLoad Javascript piece, and the execuion halts, thus
stopping the rendering.
What kind of event is "odnunload" ?
<body onload="location.href='http://www.cnn.com/'" 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.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: