开发者

C#.net Clientscript.GetWebResourceUrl for embeddding the script tags

What will be the benefits of embedding the tags into the webpage? In my application, we are embedding the Jquery resource like this:-

<script id="jquery_js" type="text/javascript" src="/Su开发者_Python百科b/WebResource.axd?d=IYhTi0o5iq80gCyMHTaiGmRN8YGagUI681aLuVI5GabftZFqPjvBvf-OBOcIIU6B0vOU-f_YI6Y2aagBQ2&t=634239484939658631"></script>

I want to know the benefits of this approach in the real time application. Please share your views.


The WebResource handler lets you serve static resources from an assembly. One benefit is that you can usually ship your application in a smaller package (sometimes only 1 dll and 1 web.config). Another benefit is that your customer cannot upgrade jQuery to the newest version for your webapp, because it always uses the version that is embedded in the assembly. Of course this also has several drawbacks, such as needing to compile and ship a new version of the dll just to make minor changes that could otherwise have been done by a simple edit of file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜