All scripts you add to a GlobalScriptArea will be placed within a single <script> tag inside the HTML head. You have the option to compressing these as well ( 0 = none , 1 = remove whitespace, 1=obfuscate and pack).
As usual – the DebugMode must be set to true for this to ever happen.
Personbally I mostly use 1 [...]
How dows it work?
Pretty much the same as for javascript.
1. If appsettings debugmode = true then it never compresses the css file but instead just sets the link href=” path directly to the script.
All we can do with CSS files are CSSInHeaderCompression = 0 (none) or CSSInHeaderCompression = 1 (remove whitespace).
Now our handler is [...]
How dows it work?
1. If appsettings debugmode = true then it never compresses the javascript file but instead just sets the script src=” path directly to the script.
i.e
<headermanager:IncludeScript Path="~/scripts/hello.js" />
—–>
<script type="text/javascript" src="/www/scripts/hello.js">
2. However if debugmode = false then we look at IncludeScriptsCompression. If set to 0 then same as in step 1. If set to [...]
1. My global DebugMode flag. I always use a flag for all my controls etc to enable/disable certain logging/debugging functionality.
<appSettings>
<add key="DebugMode" value="true"/>
</appSettings>
When set to true packing/obfuscation will NEVER take place regardless of other variables.
2. The ASPCodeHeadermanager section
<configuration>
<configSections>
<section name="ASPCodeHeaderManagerSettings" type="XmlConfigurator.XmlConfigurator, XmlConfigurator" [...]
