1

As per Yahoo's guidelines for performance of web sites , javascripts should be combined in one to avoid extra http request , as i saw in YSlow asp.net loads 3 to 4 scripts one for MicrosoftAjax.js , one for microsoft MicrosoftAjaxForms.js & some other 2 which may tondle postbacks & client side validations , I want these 4 js to be in one.

there are 4

Please tell me how to do i achieve this ?

Thanks .

2 Answers 2

2

You might want to take a look at the ScriptManager - CompositeScript feature... http://msdn.microsoft.com/en-us/library/cc488552.aspx
which can be used like this:

<asp:ScriptManager runat=”server” ID=”ScriptManager1”>
<CompositeScript>
    <Scripts>
        <asp:ScriptReference Name=”MicrosoftAjax.js” />
        <asp:ScriptReference Name=”MicrosoftAjaxWebForms.js” />
    </Scripts>
</CompositeScript>

Note that this is an ASP.NET 3.5 feature.. so if you are using at least 3.5, you will have access to this..

Sign up to request clarification or add additional context in comments.

Comments

0

I recommend you read this article which talks about the same thing you've asked.

http://www.codeproject.com/KB/aspnet/fastload.aspx

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.