开发者

set etag of cdn javascript files

开发者 https://www.devze.com 2023-02-04 03:23 出处:网络
I am running my web application developed in .net in IIS 7.0. I have configured in my web.config to set the etag of resources. Its seem to work fine for all resources except these 2 which are javascri

I am running my web application developed in .net in IIS 7.0. I have configured in my web.config to set the etag of resources. Its seem to work fine for all resources except these 2 which are javascript files from a CDN:

* http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js
* http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/jquery-ui.min.js

I set etags by:

 <httpProtocol>
        <customHeaders>
            <clear/>
            <!-- Add custom etag  -->
            <add name="ETag" value=" "/>

        </customHeaders>
</httpProtocol>

Is there any way of setting the etage fo开发者_开发技巧r the 2 external cdn javascript files?


This is fully outside your control. Basically, the ajax.microsoft.com serveradmin is the only one who can change this.

If the Etag is really that important for you, I'd suggest to look for another CDN which serves Etags along. For example, jQuery's own CDN.

http://code.jquery.com/jquery-latest.min.js


It seems like the new microsoft cdn does include etags:

http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js

set etag of cdn javascript files

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号