Closed Bug 298809 Opened 20 years ago Closed 19 years ago

load images in "display:none" boxes with low priority

Categories

(Core :: Layout, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jindrich, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.4

When there are some images in boxes which has CSS property "display" set to
"none" (they aren't visible), this images are loaded with "standard" priority
and while they aren't displayed anywhere on the page, they slows down
downloading of other visible content in the page.

It should be better to load images in "display:none" boxes with lowest priority
(after other content is loaded) because then it feels like page is loaded "faster".

Or do it like Opera or Konqueror: load images in "display:none" boxes ONLY when
they becomes visible.

In my opinion the best solution is to have 3 modes (configurable in about:config):
1) standard - like now. Load images without regard to their visibility
2) load images in "display:none" boxes with lowest priority (after all content)
3) like Opera/Konqueror - don't load images in "display:none" boxes. Load them
only when this boxes becomes visible.

Reproducible: Always

Steps to Reproduce:
1. Limit your internet connection to low speed (better to see difference while
reproducing), install Live HTTP Headers extension (optional)
2. Open testcase at
http://members.chello.cz/jpozlovsky/displaynone_testcase.html and wait until
page is loaded
3. Click on "Show"

Actual Results:  
Images are loaded in this order: img1.png, img2.png, img3.png

Expected Results:  
Load images in this order: img1.png, img3.png, img2.png
(because img2.png is in "display:none" box which is not visible by default)

OR load only img1.png, img3.png and after clicking on "Display: Box#2" load img2.png


I've tested it on Linux (Firefox, Konqueror, Opera) and on Windows (Firefox, Opera)
in Expected result there should be of course:
...and after clicking on "Show" load img2.png...
we fixed this on trunk, right?
Christian: I've tried it with
Mozilla/5.0 (X11; U; Linux i686; cs; rv:1.8b2) Gecko/20050625 Firefox/1.0+

and same result as Firefox 1.0.4 so imho it isn't fixed in trunk...
Duplicate of bug 47661?
Actually, trunk Gecko DOES load such images at lower priority than images that
are actually being shown.  I'm not sure what sort of testing you did in comment
3, exactly.  The testcase with 3 images is not really going to tell you
anything, since you can have all three loads in flight at once; we start
throttling back low-priority images when we have to decide what request to
dispatch to the server next in cases when the max number of connections per
server is reached and then a connection becomes available.
I've been playing with network.http.max-connections-per-server and
network.http.max-connections on trunk build and it works same as described in
comment 5. So it's OK.
The original reporter indicates that this has been fixed.  Resolving WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.