I've got an ASP.NET web application, and I'm attempting to reduce HTTP calls to the server, so I'd like to not load things like MicrosoftAjaxWebForms.debug.js
and MicrosoftAjax.debug.js
.
Script manager is used to form all of my external javascript files into one, and I'm concerned that this is causing other non-related libraries to be loaded.
To get rid of the debug versions of the scripts you have to disable debug mode in web.config
. Find the element called <compilation debug="true">
under /configuration/system.web
and change it to <compilation debug="false">
.
It is indeed the ScriptManager that is pulling these in. You might be able to reduce the number of scripts it adds by turning off the different features on it, eg. PageMethods
.
Look for the properties that starts with Enable...
Of course, it will probably be easier to just create a small method that does the same as the ScriptManager, all it does is add some <script>
tags to the document..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.