This is a migrated thread and some comments may be shown as answers.

WebResource.axd files

7 Answers 522 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
imran
Top achievements
Rank 1
imran asked on 20 Jun 2009, 02:00 PM
I am using RadRotator, RadWindow and AjaxManager on Single Page with RadScriptManager and radStyleSheetManager on MasterPage.The problem is , the page creates a huge WebResource.axd file (arounf 450KB).I have enabled ScriptCombine and Compression in RadScriptManager and StyleSheetManagers but still 450KB is huge enough for using these controls.I have debug=false in my Web.config file with IIS Compression. Does RadControls add separate script files for each control or is there a way that I can reduce the size of overall compressed WebResource.asd file?


Thanks

7 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 25 Jun 2009, 08:54 AM
Hello imran,

In order to provide rich client-side capabilities every control from the RadControls for ASP.NET AJAX suite uses one or more javascript files. In addition, there are common javascript files that are used by all controls, e.g. Core.js (used by every control) or jQuery.js (used in most controls). In your installation folder a folder Scripts should exists. It contains the scripts that every control needs in order to operate properly. You can also check this help article for additional information.

Onto your particular question:
On a blank new page I added the controls that you mentioned: RadScriptManager, RadStylesheetManager, RadAjaxManager, RadWindow and RadRotator.

Having output compression turned on and ScriptMode="Release" - the total size of the javascript was less than 160 KB.


I removed all RadControls from the page and added just the MS ScriptManager (ScriptMode = Release) and the result was 67KB.



Disabling the output compression of RadScriptManager results in javascript of 600KB size:


Note that the javascript is cached, so they are downloaded only the first time you visit the page.



Kind regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Armando
Top achievements
Rank 1
answered on 18 Aug 2009, 08:21 PM

How do you get compression to work ?

I have a similar case, one page using RadTabstrip, RadMultiPage, RadGrid and RadInput, getting a huge webrespource.axd (700KB, even 900KB) the first time i hit the page

 

Although radcompresion is enabled on web.config, 


 

 

<

httpModules>

 

 

...
<add name="RadCompression" type="Telerik.Web.UI.RadCompression" />


the result I'm getting (as seen in Fiddler) seem pretty "uncompressed" to me, am I doing something wrong ?

In internet web faced sites, if the first time a user hits a page haves to download that amount of data, the server performance is severely affected, can you give me some advice on how to deal with this issue ?
Thx in advance





 

0
Veselin Vasilev
Telerik team
answered on 21 Aug 2009, 02:42 PM
Hi Juan,

Note that RadCompression is designed to automatically compress your AJAX and Web Service responses.
RadCompression is not designed to be a complete replacement for other HTTP compression tools, such as the built-in HTTP Compression in IIS 7. Instead, it is designed to work with those existing tools to cover scenarios they usually miss - namely the compression of bits moving back and forth in AJAX (and now Silverlight) applications. If you have HTTP Compression enabled in IIS7, you'll discover that it does not compress your AJAX and Web Service responses; it only compresses the initial bits sent to the browser when the page is requested. By adding RadCompression to your project, you cover those gaps and start compressing your XHR (XmlHttpRequest - i.e. the "X" in AJAX).

Please check this help topic on more information: RadCompression

Kind regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Armando
Top achievements
Rank 1
answered on 28 Aug 2009, 10:35 PM
So, i must deal with the fact that the first time someones hits a page with Telerik controls on it, a pretty big webresource.axd file will be sent from the server, with all the scripts needed for the stuff to work, that's right ?

The next times a user hits the page, the axd file is cached and so the size of data travelling is much less.

is there a way to controll wich scripts are included in the axd file ? For instance, in one page I use RadTextBox, but I use them just as regular textboxes, for aesthetic issues to be said. Nevertheless, the server sends me a big RadInputScripts.js inside the axd, most of which I surely don't ever use....

Regards
Juan


0
BaiH
Top achievements
Rank 1
answered on 01 Sep 2009, 03:21 PM
Hey Juan,
I do not think this is possible, but if you only use the css part of the input you may think about styling it yourself, or maybe use the RadFormDecorator or RadInputManager however the later two will need transferring javascript too.

--BH


0
kollam2003
Top achievements
Rank 1
answered on 28 Oct 2009, 12:22 PM
Hello Admin,
Should we copy the scripts folder to the root folder in the case of RadControls for ASP.NET AJAX Q2 2009
0
Neha
Top achievements
Rank 1
answered on 11 Feb 2011, 10:55 PM
How to look for the size of WebResource.axd file?
Tags
ScriptManager and StyleSheetManager
Asked by
imran
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Armando
Top achievements
Rank 1
BaiH
Top achievements
Rank 1
kollam2003
Top achievements
Rank 1
Neha
Top achievements
Rank 1
Share this question
or