Closed Bug 473528 Opened 16 years ago Closed 16 years ago

Empty or blank URL in "background-image" CSS property causes unwanted repeat page request.

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 370675

People

(Reporter: will.barden, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20

Tested in FF 2.0.0.20 and FF 3.

Anything with an empty CSS background-image causes FF to background re-load the current page. For example:

CSS included in mypage.php
--
#myitem {
  background-image: url();
}
--

FF would first fetch the page and display it in the browser. Then, during rendering and application of the CSS, it would re-fetch the same page as an attempt to get the background image.

This causes problems when pages perform particular actions, such as database interaction. We discovered it because a key being inserted into the database was being re-inserted invisibly somehow. Eventually tracked it down to a double page load thanks to an empty background-image.

Reproducible: Always

Steps to Reproduce:
1. Install Firebug.
2. Create a page as follows:

<html>
  <head></head>
  <body style="background-image:url();">
  </body>
</html>

3. Open the page in FF, open Firebug and view the "Net" tab. You will see 2 requests for the page. The second is made by the CSS property.
Actual Results:  
2 page requests.

Expected Results:  
An empty/blank background image. No request should be made for an empty URL.
Wdr don't care anymore about FF2 (end of life) and the statement Firefox3 is not enoug. Could be FF3.0-FF3.0.5,FF3.1b2, FF3.1 trunk

I assume that you mean FF3.0.5 and this should be fixed with bug 444931
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Tested with FF3.0.5 - bug still exists.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
This is not a duplicate.

Bug 444931 is about the ‘src’ attribute on ‘img’ tags, which was changed to ignore empty strings (which resolve to the base URI).

The resolving behaviour of CSS URLs hasn’t changed as far as I know. Note that this behaviour is entirely according to the standards, by the way.

Please either re-open (as I can’t), or resolve as invalid as this is not a bug.
>Tested with FF3.0.5
3.0.5 doesn't matter, please test afain with FF3.1b2 or later
We do have an existing (invalid/wontfix) bug on this.
Whiteboard: DUPEME
indeed, i have found something better to dupe, thanks bz
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → DUPLICATE
*arg* bug 370675 is marked as dupe of bug 225554 and bug 225554 itself is marked as dupe of 444931

what now ?
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.