开发者

My images are loading too late, why?

I have a few js and css files that loads on the head. After the last js file there is a gap (on Firefox) of 1311ms until the browser starts to load the images.

My images are loading too late, why?

Firebug doesn't show any status on this blank space.

What does it mean? Why are my images loading so late?

All images on cache, the gap is still there...

My images are loading too late, why?

Full no-cache load:开发者_StackOverflow中文版

My images are loading too late, why?


You have a 300kb JavaScript file. That's a lot of JS to parse and possibly execute. Try the profiling tool in Firebug or Chrome to see what JavaScript is being run on page load.


there some maybe reason.

  • Those static file in many HOST, these are not in the same HOST.
  • Your browser is resolve these file slowly.
  • A javascript file in these file spending much time.

you can use some web preformance tool, like Yslow, chrome console .. to analysis this problem.


If we're talking img tags, then the delay might be the time it takes the browser to render the page. I'd have to look for a reference, but I recall that the browser doesn't start to fetch images until it has rendered the page. You could test this out by adding some profiling that shows when the page has completed rendering, and compare that to the time the first image starts loading. I have profiling inserted in my pages that inserts timestamps as the very first statement/element (inside the head), and the very last (in the body). Comparing the two gives you the approximate render time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜