views:

836

answers:

3

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?

A: 

For a first step, I'd watch the network using Fiddler, both for IE and for FireFox. See if there's a significant difference in the order of the resources they're loading, and the time it takes.

Also, since JavaScript is involved, it's possible that some of the page resources are being loaded by JavaScript code that is running differently on IE than from the other two browsers.

After analyzing things, you'll have a better idea of whether IE is slow, and where it's slow.

John Saunders
+1  A: 

It took 10 seconds for me to load your page in Firefox. The difference you see is probably a difference in cacheing between different browsers - try clearing your cache in firefox (Tools>Clear Private Data) and you will probably see the same slowness.

To speed up initial page loading for the first visit (which will probably be more important to you) try using YSlow to profile your site.

Colin Pickard
+1 for YSlow :)
Jonathan Fingland
+2  A: 

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
    2. Use a Content Delivery Network (CDN)
    3. Add Expires headers
    4. Compress components with gzip
    5. Put JavaScript at bottom
    6. Configure entity tags (ETags)
  • E:
    1. Avoid AlphaImageLoader filter
  • C:
    1. Reduce DNS lookups
    2. 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.

PatrikAkerstrand