开发者

Reducing tons of itty bitty HTTP Requests

I've seen in our web app through the network panel in Firebug that there is dozens of small .js file requests (less than 500 bytes often). Same with images.

Is there some nice super awesome technology that solves this problem? Wouldn't it be much faster to have all th开发者_StackOverflow社区ese files in one http request? I remember reading once that gmail speed up the initial load by some huge factor by lowering the number of HTTP requests done for resources like images and scripts.

Thanks SO for any resources!


I don't know of any super awsome technology that could solve the problem like that... Just combine all of the js files into one or two, and combine the images into css sprites. Google uses sprites a lot.


You can use the Google Closure Compiler to combine all your JS files into one, minifying them at the same time. Just specify more than one input file on the command-line (i.e. multiple --js options).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜