Closed Bug 192059 Opened 22 years ago Closed 18 years ago

Images loaded in background leave messages on status bar after document done.

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 209330

People

(Reporter: jag+mozilla, Assigned: jag+mozilla)

Details

See bug 171053 and bug 131256 comment 23 and on. Splitting this off since I
don't think this is really part of bug 131256, nor do I believe this to be
nsbeta1+[adt1].

The initial fix for bug 171053 wasn't correct since we weren't getting
notifications anymore for any images, so we couldn't show the activity for these
images in the status bar. This ended up becoming part of bug 131256. We'll want
to do one of two things here: 1) make sure we send whatever notification is
needed to let the BrowserStatusHandler know to clear the status bar when the
image (loaded in the background) is done loading, or 2) make
BrowserStatusHandler ignore notifications coming in after the "document done"
notification.
related: bug 57607 ?
Nah.
For background images or images loaded from JS (put differently, images that
complete their load after the document is done loading) we don't always clear up
the status bar text.
Nav triage team: nsbeta1-
Keywords: nsbeta1nsbeta1-
Product: Core → Mozilla Application Suite
This bug appears to have been open for nearly 3 years. Any word on its progress?

I've discovered something that I think is similar in origin.  Below is a detailed report.

1) Can you please let me know if you think this issue I am reporting is related to the same bug?

2) Can you please let me know if there is any way I can force the status bar to say "Done" using the OnLoad / OnError events for the image I am loading in the background?

Tank you very much.  Details of the issue below:
----------------------------------------------------

I'm having an issue with the status bar in Mozilla and Netscape showing that it is still waiting on the page to load even after it is finished. This problem does NOT occur with IE.

In summary, I am using a onLoad event in the BODY tag to communicate back to another server each time a page finishes loading. I do this by using a "new Image()" and setting the .src property to the server. The .src includes a value in the querystring so I know what request it was that finished loading.

The challenge here is that the status bar still shows "Transferring data from www.mysite.com..." despite the image being loaded. It never clears and leaves the user with the impression that there was a problem loading the page. My web server logs at the mysite.com show that the browser does
indeed make a request for the image and I get the querystring just fine and it returns a status of 200 so the image is being found and served ok.

I've tried everything I can think of to solve this and really could use your help please. Bottom line is that if you use the "new Image" statment from within the OnLoad event of the Body tag, Netscape and Mozilla never seem to update the status bar to show "Done" despite it succesfully loading the image.

Here is a simply snippet you can use to easily reproduce this issue:

CASE A:

<html>
<body onLoad="var img = new Image(1, 1); img.src = 'http://www.mysite.com/img.gif';" >
</html>

Case A results in a status bar that indefinately shows "Transfering data from www.mysite.com..."

Now interestingly if you change the .src so that its a relative URL instead of absolute the problem goes away, like this:

CASE B:
<html>
<body onLoad="var img = new Image(1, 1); img.src = '/img.gif';" >
</html>

With this Case B the status bar says Done as expected and all works great.

The challenge here is that the web server that the page is running from and the web server that I need to make the new Image .src request go to are two different servers. So I must use the absolute URL.

I wanted to pass this additional information along however because it may spur some ideas as to what is going on and how I can correct it.

I've tried a variety of things such as trying to clear the status bar by forcing a window.status="" after the .src property is set, but that doesn't help. I also tried other things such as using setTimeout to delay the .src property being set to x milliseconds after the Body OnLoad event fires, but in this case the same thing happens to the status bar (except that the "Transferring data from..." message just shows up x milliseconds later.

Interestingly Firefox does not suffer from this behavior, nor does IE. It seems specific to Mozilla and Netscape, trying the latest version of each.

Assuming this is a bug, perhaps someone has ideas for how to trick Mozilla back into realizing that it is indeed finished so it'll update the status bar?

Any help, tips or suggestions would be GREATLY appreciated!! Thanks so much in advance.
I was seeing the same or a similar bug in FF 1.0.4 when I use a fairly generic js image preloader and a js image rotator on a page.  However the bug seems to have been cleared up in FF 1.0.5.1 for windows!

I'm not sure if it is worth me going through the trouble of outlining the details of what I was seeing, but here goes, just in case it could be useful to someone....

The preloader preloads the images available to the image rotator.  You can see it here:

http://www.brianmaniere.com

The "transferring data from..." message appears the first time a person visits the page (always), and every other time they visit the page until every possible image available is displayed at least once in the image rotator.  After all 16 images have been viewed in the rotator at least once, the message doesn't show -- unless the cache is cleared and then the problems happen again.

If I comment out the second call to the preload images function (at the end of the brianmaniere-home.js file) I don't see the "transferring data from..." message when I load the page.  but as soon as I rotate a photo in the image rotator, it appears and doesn't go away until I've cycled through all 16, leave the page, and return without clearing my cache.  I was also sometimes getting "Waiting for...." messages instead of "Transferring data..." messages.  That was driving me crazy.

But again, everything is groovy in FF/win 1.0.5.1.

I'm not going to change the status on this.  But maybe this merits one of the FF expert assignees testing whether this issue has in fact been cleared up in FF/win 1.0.5.1.
http://www.brianmaniere.com WFM Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060531 Minefield/3.0a1

*** This bug has been marked as a duplicate of 209330 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.