网站加载时间改进
今天我正在检查网站的加载时间。我在 firebug 中使用 net panle 来查看哪个资源花费了多少时间。
我已附上结果的 spanshot。
在这个快照中,我对我标记的最后三个资源有点困惑。
我的问题是为什么它在经过很长时间的等待后才开始加载?这些资源只需要几秒钟即可加载,但它们是在长时间延迟后启动的。
这有什么原因吗?
today I was checking for the loading time of the site. I used net panle in firebug to see which resource takes how much time.
I have attached the spanshot for the result.
In this snalshot I ma bit confused about the last three resources which I have marked.
My question is that why its start loading after very long wait? Those resources taking only few seconds to load but those are starting after a big delay.
Any reason for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
加载时间仍然很短...差距是加载时间...即可能是 DNS 或其他方面的速度略有下降。你加载过多次了,还是一样吗?
The load time(s) are still minimal... the gap is WHEN they were loaded... i.e. may have been a slight slowdown on DNS or something. Have you loaded multiple times, is it always the same?
删除缓存并查看在以下情况下是否仍然发生:200 OK!
delete the cache and see if it still happens with and after: 200 OK!
如果没有看到实际的页面,就不可能说出原因。但大多数 URL 都是由计时器对象触发的(查看此处的页面 - 一旦您开始撰写答案,它将开始触发保存草稿的请求)。
另一个原因可能是浏览器只是忙于运行 javascript 来加载这些 URL。
顺便说一句,有了所有这些 304 响应,您的网站性能肯定非常糟糕。
PS,下次发帖时请脱掉手套。
Without seeing the actual page its impossible to say why. But most the URLs are triggered by a timer object (have a look at a page here - once you start composing an answer, it will start to fire back requests to save a draft).
Another reason may be that the browser was just to busy running javascript to get round to loading those URLs.
BTW, with all those 304 responses, your sites performance must be pretty awful anyway.
PS, take the gloves off next time you post.
尝试页面速度选项卡。查看是否有任何 JavaScript 块需要一些时间才能执行,从而导致页面加载中断。
有Flash加载吗?
有视频吗?
除了 html、css、javascript 和小图像之外还有什么吗?
Try the page speed tab. See if there is any javascript block taking some time to execute and thus causing the break in page loading.
Is there any Flash loading?
Any video?
Anything other than html, css, javascript and small images?
firebug 上的红线表示“加载”事件(不是 DOM 加载事件!)。因此,某些请求是在页面加载后发出的。查看您的脚本,可能会在加载所有内容后加载某些内容。
Red line on firebug means "load" event (not DOM load event!). So, some of the requests are made after the page loads. Look at your scripts, may be something loads after everything is loaded.