How do you do page performance tests?

后端 未结 7 1358
广开言路
广开言路 2021-02-15 12:31

I know everyone who reads the question will think \"Firebug!\" right away. Maybe some will think \"YSlow!\" and \"Google Page Speed!\"

While I really like these tools, I

7条回答
  •  自闭症患者
    2021-02-15 12:49

    I am not sure it is a useful endeavor to optimize for only one vendor:

    • regarding HTML, most browsers are written to optimize for standard layout techniques (tables, table-less, etc.)
    • the rendering engines are quite different between IE6 and IE8, so already that is like two different browsers
    • most of the techniques for optimizing are standard across browsers (put javascript at bottom so you don't block page loads, move javascript to external file, use multiple hostnames for images etc. to take advantage of parallel loading, don't use tables for overall layout, make sure caching headers are correct, etc.)
    • once you have a site optimized for Firefox, I would argue there is little more to be gained as far as tweaking it for IE; there is probably more you can do at the application level at this point (optimize queries, etc.), unless your site is largely static content, in which case you can investigate caching, HTTP compression, etc.
    • if your concern is actually in optimizing Javascript code for IE, then there are many good cross-browser Javascript libraries that are in an arms-race for best execution times across browser platforms, so again, picking a cross-browser solution is the way to go
    • the browser landscape is constantly evolving, and your customers are likely to move on to another platform at some point down the road; optimizing for several different browsers now will end up with more compatible code that is more likely to perform well when a platform change is made at some point in the future
    • I would argue that writing cross-browser optimized code will result in a more maintainable code base with fewer magic IE hacks, whose reason for existence will soon be lost in the mists of time

提交回复
热议问题