kustodian / extended-statusbar

Firefox addon which adds a statusbar with speed, percentage, time and loaded size (similar to Opera's one)
https://addons.mozilla.org/en-US/firefox/addon/extended-statusbar/
GNU General Public License v3.0
18 stars 6 forks source link

Count images loaded from CSS #20

Closed kustodian closed 3 years ago

kustodian commented 10 years ago

Currently ESB doesn't count the images which are loaded by CSS, which means the image counter isn't correct.

adoxa commented 10 years ago

This could possibly be done with TracingListener, testing request.contentType (not during onProgressChange as that doesn't always have contentType). Don't know how you'd distinguish them from img tags, though, perhaps make the src array part of esbValues. Another problem is that sometimes neither method have images. Of course, they also don't consider images embedded in the CSS, nor the favicon (presumably since it's not technically part of the browser). Had a look at how Web Developer does it, and that's probably a better solution, possibly without the link test, though. I'll give that a go later.

adoxa commented 10 years ago

I can count the CSS images, but because it's only a URI there's no complete information. Should I just assume complete, do some mucking about with TracingListener (checking contentLength <= data available, but as mentioned above, it's not always used), or is there something else?