Last Comment Bug 125273 - css background-image doesn't reload
: css background-image doesn't reload
Status: VERIFIED WORKSFORME
[CSS1-5.3.3]
: css1
Product: Core
Classification: Components
Component: Layout: Images (show other bugs)
: Trunk
: All All
: -- minor with 5 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 167514 (view as bug list)
Depends on: latebg
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-13 09:33 PST by Eduardo Costa
Modified: 2007-07-16 18:24 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (1.45 KB, application/zip)
2007-07-16 15:40 PDT, Adam Guthrie
no flags Details
testcase (1.45 KB, application/zip)
2007-07-16 15:49 PDT, Adam Guthrie
no flags Details

Description Eduardo Costa 2002-02-13 09:33:00 PST
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; }
Comment 1 Fabian Guisset 2002-02-13 10:10:57 PST
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.
Comment 2 Johnny Stenback (:jst, jst@mozilla.com) 2002-02-13 10:18:22 PST
Not a DOM problem...
Comment 3 Eduardo Costa 2002-02-13 11:28:18 PST
I shift-reloaded, but it still not working.
And sorry about the DOM...
Comment 4 basic 2002-02-19 01:43:34 PST
can we get a testcase? And what element is this background image on? a <table> ?
Comment 5 Eduardo Costa 2002-02-21 00:22:34 PST
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.
Comment 6 Chris Casciano 2002-04-05 16:54:46 PST
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
Comment 7 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-04-07 08:41:57 PDT
This seems like it probably has something to do with the way images are loaded
from painting routines.
Comment 8 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-04-22 21:04:51 PDT
->ImageLib.  This is closely related to bug 121787.
Comment 9 Greg K. 2002-07-11 22:07:53 PDT
Reconfirmed using FizzillaCFM/2002070913. Setting All/All.
Comment 10 Christopher Hoess (gone) 2002-09-20 16:27:48 PDT
bug 121787 duped into bug 57607.
Comment 11 Adam Kennedy 2003-03-01 12:03:31 PST
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.
Comment 12 Pavol Vaskovic 2003-08-03 16:35:11 PDT
*** Bug 167514 has been marked as a duplicate of this bug. ***
Comment 13 Vedran Miletic 2003-10-05 08:37:47 PDT
retargeting
Comment 14 Adam Kennedy 2004-03-09 03:06:48 PST
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.
Comment 15 Greg K Nicholson [:gkn] 2004-04-22 16:36:58 PDT
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)
Comment 16 Miroslav Wiesner 2004-10-14 19:35:27 PDT
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
Comment 17 Miroslav Wiesner 2004-10-14 19:45:15 PDT
(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

Comment 18 Anne (:annevk) 2004-12-18 01:12:08 PST
Could someone attach a testcase? The URL doesn't work for me.
Comment 19 Gérard Talbot 2007-07-14 15:26:11 PDT
(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
Comment 20 Adam Guthrie 2007-07-16 15:40:34 PDT
Created attachment 272558 [details]
testcase

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
Comment 21 Adam Guthrie 2007-07-16 15:49:40 PDT
Created attachment 272559 [details]
testcase

Sorry, the previous testcase had incorrectly named images in it.
Comment 22 Gérard Talbot 2007-07-16 18:24:08 PDT
Adam, that 272559 attachment also WORKSFORME

Marking VERIFIED

Note You need to log in before you can comment on or make changes to this bug.