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

RESOLVED DUPLICATE of bug 370675

Status

()

defect
RESOLVED DUPLICATE of bug 370675
10 years ago
5 years ago

People

(Reporter: will.barden, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 444931
(Reporter)

Comment 2

10 years ago
Tested with FF3.0.5 - bug still exists.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---

Comment 3

10 years ago
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
Last Resolved: 10 years ago10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 370675
*arg* bug 370675 is marked as dupe of bug 225554 and bug 225554 itself is marked as dupe of 444931

what now ?

Updated

5 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.