weixin_33698043 2009-01-27 04:27 采纳率: 0%
浏览 47

在CDN上托管了Microsoft Ajax?

Google hosts popular ajax libraries for free at :

http://code.google.com/apis/ajaxlibs/

You get to take advantage of their bandwidth, their CDN and most importantly that users may already have it cached from another site that is retrieving their JS files from google.

Was just wondering if the same is true for Microsoft AJAX anywhere? Or is there somewhere on Microsoft's site I could 'steal' the hosting from.

Also is there any benefit of me hosting it myself on a CDN like Amazon A3. I believe I wont solve the number of simultaneous downloads issue because internet explorer will block while a script is downloading.

  • 写回答

2条回答 默认 最新

  • Lotus@ 2009-01-27 22:33
    关注

    You are asking a couple of questions here.

    Firstly as far as I know Yahoo and Google are the only companies that offer free CDN hosting for JavaScript libraries.

    Secondly, the thing that will hurt your page performance is excessive DNS lookups. It's about balancing the cost of a DNS lookup vs. the difference in speed of a CDN compared to your local server. Normally the difference between the CDN and your server is enough that it's definitely worth getting your common library from the CDN.

    In an ideal world you should use as few hostnames as possible. You should be aiming for 1 HTML page from your server, 1 Javascript from CDN and 1 CSS from CDN. If you can't afford your own CDN access then 1 HTML page from your server, 1 Javascript Library from CDN, 1 Javascript file from your server. 1 CSS library from CDN and 1 CSS file from your server is fine. That's still only 2 hosts. The performance guidelines say 2-4 is your ideal.

    In terms of using S3 as a budget CDN you should compare the speed of getting a file from S3 and your own host to evaluate if that is worth while. It's extremely important that any CDN you use only has 1 hostname. So if S3 redirects requests to S3.1.amazon.com and S3.2.amazon of whatever it wouldn't make a good solution.

    I hope that helps.

    评论

报告相同问题?

悬赏问题

  • ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
  • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
  • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
  • ¥15 知识蒸馏实战博客问题
  • ¥15 用PLC设计纸袋糊底机送料系统
  • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题