帮助加快网站性能,尤其是在 IE8 中

编程入门 行业动态 更新时间:2024-10-26 16:23:19
本文介绍了帮助加快网站性能,尤其是在 IE8 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果您想加快此网页的加载速度,您会从哪里开始?

网站:Game-On Glove

它是 JavaScript 重的,因为目标是单页布局和轻框结帐.托管平台对服务器端代码部门造成了一些限制.

如果有任何人都知道的 Flash 或 JavaScript 横幅看起来不错,是 XML 驱动的,并且实际上利用了并行下载,请告诉我.我选择预加载出现在我们的 Flash 图库中的一堆 250 像素的图片,以利用我们选择的 Flash 横幅没有利用的并行下载.

除此之外,在 Firefox Firebug NET 选项卡中,我看到:

  • 初始 gameonglove 请求需要 6.75 秒.这似乎很高.我想知道是否可以通过将大部分 JavaScript 打包到外部文件中来开始减少它.
  • 为了减少我们的大量图片,我可以用某种圆形边框代替带有灰色边框的白色背景,而不是为每个背景专门制作一张图片.
  • Facebook、addthis 和 google-analytics 的下载需要大约 7 秒的时间,并且会暂停其余页面的加载.问题是,我相信他们等待 onLoad 事件触发.我不确定还有什么可以用作事件触发器,但我可能不必求助于其他东西.
  • 我不完全确定要保留哪些主机名,以及要在我们的服务器上托管哪些主机名以优化我们的 DNS 与并行下载的比率.
  • 避免 DNS 查找会缩短响应时间,但减少并行下载可能会增加响应时间.我的指导方针是将这些组件分成至少两个但不超过四个主机名.developer.yahoo/performance/rules.html

    不胜感激.

    解决方案

    你可以试试 Pingdom,它纯粹是衡量下载对象的时间(没有 JavaScript 处理时间或类似的东西).

    我测试了您的网站,看起来它需要 >1.7MiB 的信息,这可能部分是您的网站速度变慢的原因.

    Where would you start if you were trying to make this webpage load faster?

    Site: Game-On Glove

    It is JavaScript heavy because the goal was a one-page layout with light-boxed checkout. The hosting platform creates some limitations in the server side code department.

    If there's a Flash or JavaScript banner that anyone knows of that looks as nice, is XML-driven, and actually takes advantage of parallel downloads, please let me know. I chose to pre-load the bunch of 250px images that appear in our Flash gallery to take advantage of parallel downloads, which our Flash banner of choice doesn't take advantage of.

    Apart from that though, in the Firefox Firebug NET tab I see:

  • Initial gameonglove request takes 6.75s. This seems high. I wonder if I could start reducing it by packaging up most of the JavaScript into external files.
  • To reduce our massive number of images I could replace the white background with grey borders with some kind of rounded border instead of dedicating an image for each background.
  • Facebook, addthis, and google-analytics downloads take about 7s, and put the rest of the page load on hold. Problem being, they wait for the onLoad event to fire I believe. I'm not sure what else to use as the event trigger, but I probably shouldn't have to resort to something else.
  • I'm not entirely sure which hostnames to keep, and which ones to host on our server to optimize our DNS to parallel download ratio.
  • Avoiding DNS lookups cuts response times, but reducing parallel downloads may increase response times. My guideline is to split these components across at least two but no more than four hostnames. developer.yahoo/performance/rules.html

    Help would be greatly appreciated.

    解决方案

    You could try Pingdom, which purely measures time to download objects (no JavaScript processing time or anything like that).

    I tested your site and it looks like it needs >1.7MiB of information, which could be partially where your slowdown is occurring.

    更多推荐

    帮助加快网站性能,尤其是在 IE8 中

    本文发布于:2023-11-16 19:39:18,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1607187.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:是在   性能   网站

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!