jeudi 9 février 2017

CSS background-image loads slowly with Firebug enabled

Vote count: 0

I have a webpage which is fairly content heavy with lots of javascript, images, etc. On one of the elements I have css which defines pseudo :before element with a background image. This works fine but on Firefox there is a slight delay between when the page loads and when the background image is rendered. It's a bit difficult to give a working example because of the amount of content on the page but here is the basic idea:

http://ift.tt/2lteRCg

On Firefox with Firebug enabled - even on this very basic page, I can see a slight flicker of the background image (the back arrow before the parent <li> items) when I refresh. On the application I'm developing it's much worse - perhaps 1 second at times.

Normally, I would expect the image to take a moment to load the first time - but that it would be stored in browser cache thereafter and so load instantly along with the html text content. In this case, I am at a loss as to why there is any delay whatsoever, no matter how brief.

Can someone explain why Firebug would cause a delay and if there is any way to make sure the background image loads at the same time as the text? I've tried various preloading techniques and nothing seems to make a difference.

asked 52 secs ago

Let's block ads! (Why?)



CSS background-image loads slowly with Firebug enabled

Aucun commentaire:

Enregistrer un commentaire