与其他浏览器相比,在IE中加载页面非常慢 [英] Loading of pages in IE very slow compared to other browsers

查看:489
本文介绍了与其他浏览器相比,在IE中加载页面非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在IE中加载我工作的网站的首页时,大约需要7或8秒完全加载(即>等待(剩余x项)消失并更改为完成



完全相同的网页大概只有Firefox和Google Chrome的一半时间,无法弄清楚是什么导致了这种差异。



这只是一般的IE缓慢,还是更多一些?服务器端脚本本身需要大约45ms运行,所以这不是问题,但是我不知道我们的URL重写可能是一个原因。那么,为什么只有IE浏览器?

解决方案

这些是YSlow说你应该改进的地方:

100元



分为等级:


  • F:


    1. 减少HTTP请求


      • 使用内容分发网络(CDN)
      • 添加过期标题

      • 使用gzip压缩组件

      • 将JavaScript放在最后
      • 配置实体标签(ETags)
        E:


        1. 避免使用AlphaImageLoader过滤器


        2. C:


          1. 减少DNS查询


            • 缩小JavaScript和CSS





            您可以阅读如何解决这些问题此处。我会特别注意AlphaImageLoader警告,因为这是特定于IE。它也会导致一些请求,速度很慢,特别是当有多个图像需要过滤时。您可以尝试使用.gif图片,因为IE可以原生处理。



            Google的页面速度为您提供以下内容:



            总分:[得分:17.9%]



            • 充分利用浏览器缓存[得分:0%]

            • 结合外部JavaScript [得分:47%]
            • 最大限度地减少DNS查找[得分:57.1%]

            • 启用gzip压缩[得分:78.2%]利用代理缓存[得分:71.6%]

            • 缩小JavaScript [得分:68.5%]

            • 优化图片[得分:65%] >
            • 删除未使用的CSS [得分:33%]

            • 使用高效的CSS选择器[得分:89%]

              您可以阅读Google的最佳做法 here ,并了解如何提高加载时间和网站效率。请注意,Google在日常网络开发中有一些不被视为良好实践的做法,例如不在外部样式表中链接(这是一个额外的请求),但大多数网站不会受到外部样式表中链接的影响。所以你必须考虑每一个规则,并问问自己,如果这是你喜欢的东西,将受益。


              When I load the frontpage of the website I work for in IE it takes about 7 or 8 seconds to load fully (meaning, the "Waiting for" and "(x items remaining)" disappear and change to "Done".

              The exact same page takes about half the time in Firefox and Google Chrome, and I just can't figure out what's causing the difference.

              Is this just general IE slowness, or is it something more? The server side script itself takes about 45ms to run, so that's not the problem, however I do wonder if our URL rewriting may be a cause. Then again, why only IE?

              解决方案

              These are the points where YSlow says you should improve:

              YSlow: Grade E, Overall performance score 55/100

              Divided into grades:

              • F:

                1. Make fewer HTTP requests
                  • Use a Content Delivery Network (CDN)
                  • Add Expires headers
                  • Compress components with gzip
                  • Put JavaScript at bottom
                  • Configure entity tags (ETags)

              • E:

                1. Avoid AlphaImageLoader filter

              • C:

                1. Reduce DNS lookups
                  • Minify JavaScript and CSS

              You can read about how to rectify these problems here. I'd pay special attention to the AlphaImageLoader-warning, since that is specific to IE. It also causes several requests and is slow, especially when there are multiple images that needs to be filtered. You could try to use .gif-images instead since IE can handle them natively.

              Google's Page Speed gives you the following:

              Total score: [Score: 17.9%]

              • Leverage browser caching [Score: 0%]
              • Combine external JavaScript [Score: 47%]
              • Minimize DNS lookups [Score: 57.1%]
              • Enable gzip compression [Score: 78.2%]
              • Leverage proxy caching [Score: 71.6%]
              • Minify JavaScript [Score: 68.5%]
              • Optimize images [Score: 65%]
              • Specify image dimensions [Score: 45.8%]
              • Remove unused CSS [Score: 33%]
              • Use efficient CSS selectors [Score: 89%]

              You can read about Google's best practices here and learn how to improve load times and site efficiency. Note that Google has some practices that are not considered good practices in every day web development, such as not linking in an external stylesheet (it's an extra request), but most sites will NOT suffer from linking in an external stylesheet. So you'll have to consider every "rule" and ask yourself if that is something you like and would benefit from.

              这篇关于与其他浏览器相比,在IE中加载页面非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆