javscript update of <img> src does not cause image to reload/refresh

RESOLVED DUPLICATE of bug 187825

Status

()

Core
ImageLib
RESOLVED DUPLICATE of bug 187825
16 years ago
16 years ago

People

(Reporter: Jeffrey Friedl, Assigned: Jim Dunn)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030228
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030228

Updating in javascript the image source, e.g. with

     document.images["name"].src = "http://.........";

does not cause the image to actually refresh, even when
originally sent with a "Cache-Control: no-cache" field in
the HTTP header, and/or an Expires in the past.

For example, the small script at

   http://regex.info/imgtest.html

updates an image every two seconds. I have tested that this
works (the image refreshes) in the following situations:

    Linux / Mozilla 1.0
    Linux / Galeon 1.2.5
    Linux / Communicator 4.77
    Win2k / IE 6
    Win98 / IE 6

I have tested that it does not work (no image refresh) in:

    Linux / Mozilla 1.3b
    Linux / Mozilla build 2003022810
    Win98 / Mozilla 1.3b
    Win2k / Mozilla 1.3b

Disabling the cache does not help. Both a normal
reload and a shift-reload do cause the image to update.


Reproducible: Always

Steps to Reproduce:
1. Ensure that javascript is enabled, and that it may update images and status
2. Load test page (e.g. http://regex.info/imgtest.html)


Actual Results:  
Image is static. Status message updates every two seconds.

Expected Results:  
Both status message and image update every two seconds.

I tried with a variety of cache-busting techniques, without success, so
it doesn't seem to be cache related.

Note that IE 6 exhibited the exact same symptoms (no image refresh) when the
image was sent without cache-busting. Either adding an Expires field (as the
image fetched in the test url does), or adding a "Cache-Control: no-cache"
allows IE to work.
(Reporter)

Comment 1

16 years ago
I forgot to mentionn that but #137819 is vaguely related
(so I put it into the same component as it).

*** This bug has been marked as a duplicate of 187825 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.