Closed Bug 125273 Opened 23 years ago Closed 17 years ago

css background-image doesn't reload

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect
Not set
minor

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: ecosta, Unassigned)

References

Details

(Keywords: css1, Whiteboard: [CSS1-5.3.3])

Attachments

(1 file, 1 obsolete file)

1.45 KB, application/zip
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.8) Gecko/20020204
BuildID:    2002020415

The image pointed by a "background-image" of a linked CSS doesn't update after a
"Reload".

Reproducible: Always
Steps to Reproduce:
1. Create a HTML and a CSS with "background-image"s
2. Change the image
3. Try to reload the page

Actual Results:  The image doesn't changes

Expected Results:  The image must be updated

I have a local apache running perfect, and I use it to make my sites.
The page I'm building have CSS, and inside it, there are some "background-image"
properties. If I change the image it points to, Mozilla doesn't update when I
hit "Reload". I haven't tested it with local files.

in HTML: <link rel="stylesheet" type="text/css" href="aux.css">
in CSS: .lbgne { background: #9f9fcf url(table.ne.gif) no-repeat; }
What if you hold shift while clicking on reload? We're probably caching the
images and reloading doesn't skip the cache. shift-reload skips the cache.
Not a DOM problem...
Assignee: jst → dbaron
Component: DOM Style → Style System
I shift-reloaded, but it still not working.
And sorry about the DOM...
can we get a testcase? And what element is this background image on? a <table> ?
Well, I created a "Bug Sample Page":
http://www.tpk.com.br/bz125273/

There are six files: index.html, main.css, bg.gif, bg1.gif, change.php and
change.php3. "change.php3" exchanges "bg.gif" and "bg1.gif", "index.html" has a
link to it, and "change.php" is the source for "change.php3".

After loading the page, you can click on the link. "change.php3" will do its
work, and redirect you to "index.html". The background will not change
immediatelly (even with a 'shift-reload', but, I found that after some time
(half a minute or more), the bg changes with a simple 'reload'.

It's not a problem to a surfer, but for a webmaster, this delay is a headache.
additional platform OS X/0.9.9

I'm seeing this also. With that test page watch the following location for the
image change:

http://www.tpk.com.br/bz125273/bg1.gif
This seems like it probably has something to do with the way images are loaded
from painting routines.
Status: UNCONFIRMED → NEW
Ever confirmed: true
->ImageLib.  This is closely related to bug 121787.
Assignee: dbaron → pavlov
Component: Style System → ImageLib
Depends on: 121787
Keywords: css1
QA Contact: ian → tpreston
Component: ImageLib → Image: Layout
Target Milestone: --- → mozilla1.1alpha
Reconfirmed using FizzillaCFM/2002070913. Setting All/All.
OS: Linux → All
Hardware: PC → All
bug 121787 duped into bug 57607.
Whiteboard: [CSS1-5.3.3]
Confirm bug still exists in Moz 2003022108.

Additional note: If css is changed in a way that doesn't affect the background,
the changes do appear. Conclusion, the css file is reloading correctly, and it's
just the specific images that are a problem.
Depends on: latebg
No longer depends on: 121787
*** Bug 167514 has been marked as a duplicate of this bug. ***
retargeting
Target Milestone: mozilla1.1alpha → Future
Now that Bug #57607 has been fixed, this may need to be checked again. Anyone
who grabs a nightly after tomorrow, could you please recheck this bug.
I uploaded a new stylesheet to my site which meant obvious changes in colours,
images, etc. The stylesheet replaced the old file upon being uploaded.

I reloaded the page, no effect. I force-reloaded the page (both Ctrl-F5 and
Shift-Reload), no effect. I cleared the cache then force-reloaded some more -
still no effect.

Only by viewing the CSS file directly and reloading it could I cause the new
style to show itself. (I didn't attempt closing and reopening the browser)

I had assumed that clearing the cache would cause absolutely everything to be
reloaded on the next request for it.

(This may be a different bug, but I couldn't find a better one)

(Firefox 20040411)
I can add to this with the case I am handling currently. I created a dynamic
background-image CSS tag with php that is triggered by the existence of a URL var. 
Logic:
if var then background-image: x 
if !var then background-image: y

This worked for an indeterminant amount of time and now it does not. The browser
is stuck displaying background-image: x

I have closed the session, started a new session, shift Reload, all of the
tricks and nothing works. I have yet to attempt restarting my machine but that's
about the only avenue I have yet to try.

Firefox 1.0PR
Windows XP SP1

Cheers, Miro
(In reply to comment #16)

Please disregard. I am an idiot.

> I can add to this with the case I am handling currently. I created a dynamic
> background-image CSS tag with php that is triggered by the existence of a URL
var. 
> Logic:
> if var then background-image: x 
> if !var then background-image: y
> 
> This worked for an indeterminant amount of time and now it does not. The browser
> is stuck displaying background-image: x
> 
> I have closed the session, started a new session, shift Reload, all of the
> tricks and nothing works. I have yet to attempt restarting my machine but that's
> about the only avenue I have yet to try.
> 
> Firefox 1.0PR
> Windows XP SP1
> 
> Cheers, Miro

Could someone attach a testcase? The URL doesn't work for me.
Assignee: pavlov → jdunn
QA Contact: tpreston → core.layout.images
(In reply to comment #4)
> can we get a testcase?

(In reply to comment #18)
> Could someone attach a testcase? The URL doesn't work for me.

Eduardo Costa, if you're reading this, can you attach a testcase... or anyone else who can reproduce the bug

qawanted keyword added
Keywords: qawanted
Attached file testcase (obsolete) —
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007071305 Minefield/3.0a7pre

I am not good with PHP foo, so you'll have to manually rename the images yourself for this testcase.

That said, this works for me both locally and on a server running Apache/2.0.52. Please reopen if you can reproduce.

->WORKSFORME
Attached file testcase
Sorry, the previous testcase had incorrectly named images in it.
Attachment #272558 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: qawanted
Resolution: --- → WORKSFORME
Target Milestone: Future → ---
Adam, that 272559 attachment also WORKSFORME

Marking VERIFIED
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: