开发者

Level of integration between Microsoft CDN and ScriptManager with EnableCDN

开发者 https://www.devze.com 2023-02-16 03:58 出处:网络
Is there any integration going on, or EnableCDN=true just points script src to hardcoded locations on CDN?

Is there any integration going on, or EnableCDN=true just points script src to hardcoded locations on CDN?

Using ASP.NET Ajax from the CDN

When using ASP.NET 4, you can redirect all requests for ASP.NET framework scripts to the CDN.

Are <asp:ScriptManager EnableCDN="true" /> and CDN integrated so that I can configure ScriptManager to get the scripts c开发者_StackOverflowombined from the CDN?

Or is combining the ASP.NET Ajax files (CompositeScript) incompatible with getting then from the CDN?

Note: I'm talking about a possible integration between Microsoft products: Microsoft's Ajax scripts served by Microsoft's CDN with calls handled by Microsoft's ScriptManager control.

I.e. ScriptManager would tell CDN which of their javascript files it wanted conbined.


No it's not possible - composite script will combine local scripts (i.e. scripts from your file system/web site). If you think about it, your question does not make any sense - purpose of using CDN hosted script (as opposed to hosted by your web site) is that CDN will probably serve the script faster (it may have been already cached) as opposed to download it from your web site. Any combined scripts will always be hosted on your web site (because your combining them - right) - so they cannot be delivered from third party CDN (because they don't host your combined script)!

Said that what you should do is

  1. Deliver scripts such as jquery or microsoft ajax via CDN
  2. Deliver your scripts via CompositeScript
0

精彩评论

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