gpt4 book ai didi

asp.net - ScriptManagers 的 ScriptMode 中的 Debug 和 Release 有什么区别?

转载 作者:行者123 更新时间:2023-12-04 18:50:51 26 4
gpt4 key购买 nike

在 ASP.NET AJAX 中,我可以设置 ScriptModeScriptManager .
脚本模式可以是 Debug 或 Release。
它们之间的确切区别是什么?在 Debug模式下,生成的脚本不会缓存在浏览器上,而在 Release模式下它们会被缓存,并且随后的服务器访问将被阻止,这是真的吗?

最佳答案

引用ScriptManager.ScriptMode Property :

In Debug mode, debug versions of client script libraries are used in the Web page unless the retail attribute of the deployment configuration element is set to true.

In Release mode, release versions of client script libraries are used in the Web page unless the retail attribute of the deployment configuration element is set to false.


引用 Debugging and Tracing Ajax Applications Overview :

The Microsoft Ajax architecture provides a model for release and debug modes. Release mode provides error checking and exception handling that is optimized for performance, with minimized script size. Debug mode provides more robust debugging features, such as type and argument checking. If you create debug versions of client script files or script resources, ASP.NET runs the debug versions when the application is in debug mode. This enables you to throw exceptions in debug scripts but still keep the size of release code to a minimum.

关于asp.net - ScriptManagers 的 ScriptMode 中的 Debug 和 Release 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6450728/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com