缩小scriptresource.axd大小-刀刀的聚元阁-搜狐博客

来源:百度文库 编辑:神马文学网 时间:2024/06/04 17:42:19
This night i saw 2 threads on the Ajax forum.这晚我看到2线程对Ajax的论坛。 The 2 threads were about the size of the Webresource.axd and the Scriptresource.axd, the developer said that these files were to big. 2线程,约有大小的webresource.axd和scriptresource.axd ,发展商表示,这些文件要大。 While i was typing my answer for the developer, Kris van der Mast was already finshed with his answer.虽然我是打字我的答案为开发商,克里斯范德桅杆已经finshed与他的答案。 He said that the solution to this issue was setting .他说,解决这个问题是设置 。 My solution was setting .我的解决办法是设置 。 So i decided to check these 2 solutions.所以我决定要检查这些2解决方案。 Well, i came to the conclusion that is makes no difference which solution you choose, they have the same effect.那么,我得出的结论是,是没有分别的解决方案您选择,他们具有相同的效果。
When you set and you don’t set the Scriptmode (which is “Auto” by defaut) the Scriptlibaries that will be send to the client while inherit the setting debug=false (so release=true).当您设定和你不设置scriptmode (这是“自动”由defaut ) scriptlibaries将其发送到用户端的同时,继承设置调试=虚假(使释放=真正的) 。 So the smaller scriptlibraries will be send to the client.因此,规模较小的scriptlibraries将其发送到用户端。
When you set and the Scriptmode=”Release” then the compilation element will be overriden and the release scriptlibraries will also be send to the client.当您设定和scriptmode = “释放” ,然后汇编元素,将覆盖,并释放scriptlibraries也将传送到客户端。
My preference will go the latest option. Why?我倾向于将最新的选择,为什么呢? Well the first option has consequences for the whole application and the second option only on the page where you are working on.以及第一个选择的后果,已为整个应用和第二个选择,只在网页上你身在何处工作。 I hope you agree with me!我希望你同意我的!