How do I get ASP.Net CompositeScript to be cached in the browser?

I am trying to improve the performance of a web page that links to multiple separate JavaScript files. I found a new CompositeScript feature in .NET 3.5 SP1 that allows you to merge scripts at runtime via the ScriptManager and works great to reduce the number of hits on our server on page load.

But the problem is that the merged script is never cached on the client side. From everything I've read so far, it should do this automatically. I have nothing to prevent it from being cached (the other links we link cannot be cached, just like files ScriptResource.axd

). I even added the following to explicitly enable caching in web.config

:

<system.web.extensions>
    <scripting>
        <scriptResourceHandler enableCompression="true" enableCaching="true"/>
    </scripting>
</system.web.extensions>

      

But it doesn't seem like an effect.

Has anyone seen this problem, or have any suggestions for what I can try to fix?

0


source to share


1 answer


Debug mode anywhere? Make sure your web server Machine.Config

hasRetail="True"



<configuration>
    <system.web>
        <deployment retail="true"/>
    </system.web>
</configuration>

      

-1


source







All Articles