Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I just read an article by Omar Al Zabir "HTTP Handler to Combine Multiple Files, Cache and Deliver Compressed Output for Faster Page Load". I am trying to make my asp.net web application faster.
I have only one reference to an external .js file, but YSlow reported as many as 15! And I did find them in the page source:

<pre lang="xml"><script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe_MxigUEw0wrmPWch-yBqxTWucsvwrzzHZYBuZT8IQROw2&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe95hXUsBQNC9HFoSi06TMGM1ElDwoB-TFvB8SN3NKQHYB5oPUoSpV4245q3k6u4t3A1&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe8SPxbr_zCyGxk4_osr7Ce3SfxhbEndX9PJXrdRv9JnyNhHlW2k4Msb2myjITBILMHUs7rcbFchYPg1dhW7jXDh0&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe8mb0iNCzoBTWyt_GlUhiI6Lv2wtpzPYbxzVKla6TyxOQ2&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe9sTdnRM5FmCms6fhLYgPfK1HUIR1aAndRGMgnX3Aqn1gco5jaXoefKsezsIcXjx0I1&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe_BSTpuK41gIN_P5lkwt-zfnriYE0I6cuzHjnbjEkWmNwQHrRcALnPdX8AsukrT1-R7klzys1u13goxOrNIa62K0&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe-agWs-JDCh0fKkVDskOzmKVasxjOtBrHNT1Z98_Px1tLOy7fLQVrae1rasCsMqGfo1&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe9TG915GnWEUNLPZdI3LyK1pLHdjy4w_5EJUJdVUGEFvBtW8c17d4VMGXV-djvggVo1&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script src="/Matt/ScriptResource.axd?d=9Tt1VQ91OSy91yyQ1fmYbmmNTBGMB6PjEbT7I8CuXe9rFszQkDxJunWyPvzt2hD29vEZ1HItMGoGXwENu4lAE9qKwFaJGyJ27n0tQHVg2NQ1&amp;t=ffffffffc81a9b25" type="text/javascript"></script>
<script type="text/javascript">




As I understand, they are from ajax stuff. Now as I want to combine them into one, I need to specify them in a set inside of my web.config. Moreover, I need to change <link> and <script> tags throughout your website to point to HttpCombiner.ashx, but how can I do that, if it is not in my .aspx code?
Could you please help?
Thanks.
Posted

1 solution

You do not need to use any third part code to do that. The feature is built in the ScriptManager class (the CompositeScript property):

http://msdn.microsoft.com/en-us/library/cc488552.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900