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

Loading Telerik scripts as a single resource

6 Answers 184 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Jason Denney
Top achievements
Rank 1
Jason Denney asked on 14 Jan 2010, 11:21 PM
We have need to use ComboBox, DateTimePicker, Grid, Window, Tooltip, RadFormDecorator, and Scheduler controls all possibly on the same page.

What is the best way to manage adding the required scripts for these controls to a RadScriptManager to cut down on the total requests hitting the webserver?

Thanks,
Jason

6 Answers, 1 is accepted

Sort by
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 15 Jan 2010, 11:20 PM
Enable the CDN on the script manager and stylesheetmanager :)

http://blogs.telerik.com/blogs/posts/09-12-08/cdn_support_ndash_radcontrols_for_asp_net_ajax.aspx

They'll all pull from teleriks content delivery network instead of your webserver...and since they're coming from a different domain you're site files should load faster.  Not only that, but they have a far future expiry date so they'll stay cached which means they wont need to be downloaded every postback....
0
Jason Denney
Top achievements
Rank 1
answered on 18 Jan 2010, 02:44 PM
We are doing an intranet deployment so the CDN won't help us.  Also some of these will be running over the Internet through a VPN.  So we are looking at Internet performance for an Intranet deployed application.
0
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 18 Jan 2010, 02:47 PM
Have you tried the EnableScriptCombine and EnableStyleSheetCombine properties to reduce the requests?  Combined with RadCompression, you should be able to get the request size down pretty small.

Good RadCompression article


0
Jason Denney
Top achievements
Rank 1
answered on 18 Jan 2010, 03:11 PM
Ok, I was under the impression that the scripts had to be defined in the RadScriptManager to get them to combine.  So I was running into script errors trying to get the scripts all defined and in the proper order.

So how does the WebResource_1.asd?d=longid manage the longid for caching?  Is it some hash value for the contents that each unique set of scripts combined can be cached in the browser?
0
Accepted
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
answered on 18 Jan 2010, 03:22 PM
Yeah, the RadScriptManager should auto-combine the scripts required without having to assign them all yourself (link)

Have a read here for the Webresource caching




0
Jason Denney
Top achievements
Rank 1
answered on 18 Jan 2010, 03:42 PM
I think that covers what I was needing to know!  I made the changes and the app is still working as intended.

Thank you.
Jason
Tags
ScriptManager and StyleSheetManager
Asked by
Jason Denney
Top achievements
Rank 1
Answers by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Jason Denney
Top achievements
Rank 1
Share this question
or