分享

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

 thy 2008-05-27
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 <compilation debug=”false”>.他说,解决这个问题是设置<compilation debug="false"> 。 My solution was setting <Scriptmanager Scriptmode=”Release”>.我的解决办法是设置<scriptmanager scriptmode="release"> 。 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 <compilation debug=”false”> 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).当您设定<compilation debug="false">和你不设置scriptmode (这是“自动”由defaut ) scriptlibaries将其发送到用户端的同时,继承设置调试=虚假(使释放=真正的) 。 So the smaller scriptlibraries will be send to the client.因此,规模较小的scriptlibraries将其发送到用户端。

When you set <compilation debug=”true”> and the Scriptmode=”Release” then the compilation element will be overriden and the release scriptlibraries will also be send to the client.当您设定<compilation debug="true">和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!我希望你同意我的!

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多