API
Version 7.x > API > JS Minification On Azure View modes: 
User avatar
Member
Member
bryanallott - 11/13/2013 1:06:01 AM
   
JS Minification On Azure
GetResource.ashx handler has this method

private static void ProcessJSFileRequest(HttpContext context)
{
// Check whether to use minification
bool useMinification = false;
if (CMSAppBase.ConnectionAvailable)
{
useMinification = ScriptHelper.ScriptMinificationEnabled;
}

ProcessFileRequest(context, JS_FILE_ARGUMENT, JS_FILE_EXTENSION, useMinification);
}

What I've noticed on Azure though is that the JS files are not being minified and looking at the line

ScriptHelper.ScriptMinificationEnabled

always returns false if the application is running on Azure, even if the all the minification settings are set to true.

I could just override this and always minify, but wondering why the minification is false for Azure?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 11/15/2013 3:48:26 AM
   
RE:JS Minification On Azure
Hello Bryan,

Currently JavaScript minification is not supported on Azure because of incompatibility of libraries used for minification with Azure, that is why it always returns false. However, after consulting it with our Azure development team, they told me they would test it again and let me know whether the issues still persist or if it is going to be fixed in one of the hotfix releases in the future.

Anyway, I will keep you updated about the progress of this issue and the final outcome.

Best regards,
Filip Ligac

User avatar
Member
Member
bryanallott - 11/20/2013 9:23:19 PM
   
RE:JS Minification On Azure
Thanks, Filip. If you could feedback as soon as you know that would be awesome!