Closed Bug 147588 Opened 22 years ago Closed 21 years ago

when load the page the first time the browser doesn't load all javascript referenced graphics

Categories

(Tech Evangelism Graveyard :: Spanish, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 137601

People

(Reporter: pabloa, Assigned: asa)

References

()

Details

Attachments

(1 file)

3.78 KB, application/octet-stream
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513
BuildID:    0.9.9 - 2002051319

There are javascript referenced graphics and they do not load the first time I
load the page. 
If I reload the page the graphics continue missing.

If I go to the next page (follow the arrow of the site) and then back using the
browser back button then the graphics finally load.

If I reload again the page the graphics go away again.



Reproducible: Always
Steps to Reproduce:
1. go to http://www.laotraesquina.com.ar
2. Click in "Ampliar Mensajes" link
3. look for the a message with graphics, for example, see message 107. You see a
point (is the <img> tag)
4. Press the right arrow at top of the page. It's near of "Foros - Página x/x"
5. Press the browser Back button. Press the "Ampliar Mensajes" link. You finally
see the image 


Actual Results:  Only I can see graphics in step 5

Expected Results:  I must see graphics in step 2

In IE 5 I can see graphics in step 2.
I can reproduce the bug in windows nt, windows me and windows 2000 too
argh.. the page loads _very_ slow..

i think that some images had a connection timeout because the line is so _slow_

.. and reloading the page (go back and forward) seems to fix this problem..

-> INVALID?
Summary: when load the page the first time the browser doesn't load all javascript referenced graphics → when load the page the first time the browser doesn't load all javascript referenced graphics
Attached file Simple case
1) Unzip, 
2) load index.html with the browser
3) click into de brown icon: You cann't see the graphic
4) press the back browser button
5) press the forward browser button: Now you can see
6) press reload browser button
7) goto 3)
Please, use the attach:

1) Unzip, 
2) load index.html with the browser
3) click into de brown icon: You cann't see the graphic
4) press the back browser button
5) press the forward browser button: Now you can see
6) press reload browser button
7) goto 3)

Ok, the problem is:

Its a PNG image, but the webserver sends:

octet-stream as content-type

What happens here?:

Surf to the page:
- Mozilla is trying to get the image but wont display it, because the server
sends  octet-stream as content-type..
- Mozilla stores the file in the cache

Reload the page:
- Mozilla looks for the PNG in the cache and will find it
-> now, no wrong information from the webserver is providet, mozilla will
display the image..

I think this is something like a dup of bug 67940



If you access to the files of the simple case attach using
file:///blabla/index.html you get'll the same results without apache headers.
Did you change the html source?

In the testcase the image has an absolut url (with http://hostname..blabla)..
In this case, mozilla would get the image from the webserver: no matter the
image is stored on HD or on the web
Sorry! You are righr! I did not remember that the graphics had absolute url
paths with http://etc/...
Site works fine for me, 2002-07-30-22 (trunk) on Linux.

Juan, can you download a newer build and report back if you
still see any problems? Thanks.
Marking WORKSFORME, although the underlying problem mentioned in comment #4
still exists as Bug 67940.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
I test it with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
and I can reproduce the problem. It's happen with jpg images.
It worksforme on Win2k, but I'm re-opening the bug for you because you can
reproduce it; I will try on my linux build later.  Can you create a testcase
that reproduces the problem for you?  Use the simplest possible HTML and
javascript that exhibits this problem, and attach it as a ZIP file with all of
the necessary files (no network files, absolute paths, etc.)  Also, when you see
this problem, is there space reserved on the screen for the image, or not?  Thanks!
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
I try this night.
When the image load fail the browser shows the image failed icon for a few
moments. Then it shows a littlo blue point
I can reproduce the problem with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1)
Gecko/20020827 on Linux.
For example: 

- Go to
http://www.laotraesquina.com.ar/laotra/foros/mostrar.php?id=12579&chk=244123944
- Press Reload: You can not see the graphic.
- Go to the text box with he URL and press Enter (Load the URL, Do not reload
it!): You can see the graphic
- Press Reload: You can not see the graphic.
- etc.


The image is loaded with this incrested javascript code:

<div align="center"><a
href="mensaje_imagen.php?img=http://ciencia.nasa.gov/headlines/y2002/images/solarback/ssn_predict_s_sp.gif"
target="_blank">
<script language="javascript">
mostrarImagen(
"http://ciencia.nasa.gov/headlines/y2002/images/solarback/ssn_predict_s_sp.gif",
"300", "ssn_predict_s_sp.gif");

</script>
</a>
<br />
</div>



And this is the code:

function mostrarImagen( src, max_w, alt)  {
        i = new Image();
        i.src = src;
        if( i.width >  max_w)  {
                i.width = max_w;
        }
        sw = i.width;

        document.write('<img src="'+src+'" alt="'+alt+'" width="'+sw+'"
align="center">');
}



The javascript are inside a different file: 

http://www.laotraesquina.com.ar/laotra/common/funciones.js
==> default owner
Assignee: matti → asa
QA Contact: imajes-qa → asa
Hi,

I've discovered that the browser load the image, but the problem (I think) is
that the "width" and "height" properties is 0, so the image has null dimensions
and only appear a point (it has border="1").

Please go to this link (clear the cache and all this things):

http://www.laotraesquina.com.ar/laotra/foros/mostrar.php?id=31030&chk=1590105707

- the status bar shows that the image is loaded, but the browseer only shows a
point.
- If you right-click in the middlo of the point; and choose View Image the image
shows itself and it is loaded from the cache so the image was loaded before.
- This explain that if you press Enter in the location box the page is reloaded
from the cache and the image is correctly displayed.

Do you agree with this explication?

If it is correct. I think that it is a bug because the default values for width
and height properties is width and height of the image.

The image is
http://www.antena3tv.com/laisladelosfamosos/web/contenidos/programa1/diario/dia24/2802FOTO6.jpg
dupe -> Tech Evangelism

*** This bug has been marked as a duplicate of 137601 ***
Severity: major → normal
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago21 years ago
Component: Browser-General → The Americas
Product: Browser → Tech Evangelism
Resolution: --- → DUPLICATE
Version: Trunk → unspecified
v
Status: RESOLVED → VERIFIED
tech evang june 2003 reorg
Component: The Americas → Spanish
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: