是不是使用Atlas的页面里都会自动引用一个大小为366K的WebResource.axd文件呢?有没有什么办法让它小点呢?如果不确定可以打开一个使用了Atlas的文件然后另存下来看有美有一个366k的文件。其内容开头部分如下:
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// Atlas.js
// Atlas Framework.//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// AtlasRuntime.js
// Atlas Runtime Framework.
var RuntimeVersion = "2.021006.A";Function.abstractMethod = function() {
    throw 'Abstract method should be implemented';
}Function.createCallback = function(method, context) {
    return function() {
        return method(context);
    }
}Function.createDelegate = function(instance, method) {
    return function() {
        return method.apply(instance, arguments);
    }
}Function.emptyFunction = Function.emptyMethod = function() {
}Function.prototype.getBaseMethod = function(instance, methodName, baseTypeName) {
    var baseType = baseTypeName ? Function.parse(baseTypeName) : this.getBaseType();
    var baseMethod = null;    if (baseType) {
        var directBaseType = baseType;
        
        if (instance._baseMethods) {
                        
            while (baseType) {
                var methodKey = baseType.getName() + '.' + methodName;
                var method = instance._baseMethods[methodKey];
                if (method) {
                    return method;
                }                baseType = baseType._baseType;
            }
        }        if (!baseMethod) {
            return directBaseType.prototype[methodName];
        }
    }
    
    return null;
}

解决方案 »

  1.   

    没关系的  当你的程序发布以后 Atlas脚本会启用一个脚本压缩 那样会比较小的 不现在小很多就像YahooUI Library一样 同样的脚本 min版本的只有原版本的1/5左右
      

  2.   

    问题我都publish到美国服务器了。还是366K阿。
      

  3.   

    <compilation debug="false">
          <buildProviders>
            <add extension=".asbx" type="Microsoft.Web.Services.BridgeBuildProvider" />
          </buildProviders>
        </compilation>
        <httpModules>
          <add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/>
        </httpModules>