加速 swf 对象
这是我的网站:Instant-YouTube
如您所见,加载需要很长时间。在IE8及以下版本中,有时甚至会导致浏览器崩溃。我不确定是什么原因造成的。可能是 Clicksor 广告,但我认为是 swfobjects。我已经压缩了索引文件。我可以做什么来加快 swfobject 加载时间,或者加快其他任何事情?
This is my website: Instant-YouTube
As you you can see it takes forever to load. In IE8 and below it even sometimes makes the browser crash. I'm not sure what is causing this. It could be the Clicksor ads but I think it's the swfobjects. I already gzipped the index file. What can I do to speed up the swfobject loading time, or speed up anything else in general??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以防万一 - pagespeed 等工具可以为您提供一些关于优化内容的建议:
http://pagespeed.googlelabs.com/#url=http_3A_2F_2Finstant-youtube.com_2F&mobile=false
Firebug 中显示加载的所有文件的时间线对于识别性能问题也非常有帮助。
也就是说:swfobjects 的加载速度相当快 - 实际上您的页面 (html) 加载时间约为 100-150 毫秒。但这里有很多(!超过 200 个)从不同服务器加载的文件 - 当然还有很多 YouTube 预览图像。如果您希望缩短页面加载时间,那么在一个页面上放置如此多的 YouTube 播放器可能不是最好的主意。向 YouTube 提出的按类别获取观看次数最多的视频的所有请求也需要一些时间才能完成。
不能说任何关于广告的事情(我正在使用广告拦截器),但看起来 Clicksor 广告依次加载谷歌分析脚本 - 而且你有这么多......这么多的请求。然后还有其他广告(chitika?)。
那么你能做什么呢?
Just in case - there are tools like pagespeed which can give you some ideas on what to optimize:
http://pagespeed.googlelabs.com/#url=http_3A_2F_2Finstant-youtube.com_2F&mobile=false
The timeline in firebug displaying all files loaded is also very helpful in identifying performance problems.
That said: swfobjects gets loaded fairly quickly - actually your page (html) loads in about 100-150 ms. But here are a lot (! more than 200) of files loaded from various servers - of course lots of youtube preview images. Having so many youtube players on one page is probably not the best idea if you'd like to have short page loading times. All the request made to youtube to get the most viewed videos by category will also take some time to complete.
Can't say anything about the ads (I'm using an adblocker), but it looks like clicksor ads load google analytics scripts in turn - and you have so many of them... so many requests. And then there are other ads (chitika?).
So what can you do?
在 Firefox 中,您可以使用 Firebug 来测量单个项目需要加载的时间。那么你可以考虑并行加载它们。
With Firefox you can use Firebug to measure the time that the individual items need to be loaded. Then you can think of loading them in parallel.