I am trying to clean up an implementaiton of some infragistics controls. For all intents and purposes the site works just fine, and I don't want to overhaul it. It definitely has too many "elements" on it which is causing something like 40 ScriptResources to download. As far as I can tell they aren't caching, and some of the different profiling tools I have been using have been showing some HUGE times. Does anyone have any ideas on how I can try to reduce, or at least cache the, ScriptRefence calls?
lol, I had already upgraded... and then noticed the CDN in the documentation. I have renewed my subscription every year since 2003 (I think).. It has been worth every penny.
Ah, I see what you were trying to do. Makes sense. So you had to upgrade to get better performance :)
Hey Michael,
I am glad to report that I now have this working exactly the way I want.
I never wanted the HTML of the page cached... only the resources. I want dynamic HTML to remain dynamic (refreshing on every page load). And nocache is exactly the right setting. But I want all the scripts and images to come from the browser cache.
As far as the "noise", I have fully moved to the CDN, and it has worked wonders. There are fewer Infragistics scripts loaded by the page (due to script combining), and the ones that are required are being retrieved from the browser cache (because the CDN automatically sends the right cache headers). It has had a nice impact on page load times.
I am not sure what to suggest if upgrading to the CDN isn't an option... I can only say that it has worked very well for me.
Cheers,
-Rob
I have tried the script combining technique ... for reason I cannot get this to work. Pretty frustrating. I can imagine that doing so would help in this case. I would rather take a couple of large files as opposed to all of those HTTP requests!
I can see where the caching would be logical, but I am not sure that is entirely what you want. That functionality with cache the actual ASP.NET page. In many infragistics controls fall into this category a lot). That being said, even if you effectively cache your ASP.NET page, the cached content would include the calls (in javascript) to those resources and you will in fact still make calls to get those references.
By the way, if you were looking to cache a page, i think that code is not what you want. NoCache means don't cache this page ... which I am willing to bet is the default for an ASP.NET page. You would want to do something like Server. There are many options though. Please reference MSDN
http://msdn.microsoft.com/en-us/library/w9s3a17d(v=VS.100).aspx
Best of luck. Because I think this post now got buried I posted a new one if you would like to follow along.
http://forums.infragistics.com/forums/p/52280/272153.aspx#272153
I can't reply as an Infragistics "guru" or even a prominent member of the community. Just another programmer working on a Saturday :)
You are right about this being a new feature. I think it came out around 9.3 or 10.1. However, if upgrading from 8.3 is not an option, all is not lost.
Here is a blog that Infragistics wrote about how to accomplish script combining in Infragistics 8.3 using the <asp:ScriptManager/>
http://blogs.infragistics.com/blogs/tony_lombardo/archive/2008/07/28/script-combining-what-s-the-big-deal.aspx
and another (with more detail)
http://community.infragistics.com/aspnet/articles/understanding-script-combining.aspx
On the caching issue, I have a nagging feeling that I am doing it wrong, and I am hoping that somebody can chime in and help. Like you, I want the browser to not cache the HTML, but to cache ScriptResources, js files, and image files. I put the following line in the page's Page_Load event, hoping that the cache instructions would only apply to the actual HTML of the page.
Response.Cache.SetCacheability (HttpCacheability.NoCache)
However, that doesn't seem to be working as intended. Sure the HTML of the page is being requeried, but also Fiddler that shows images, etc, being reloaded on each refresh.
Probably I just have the wrong setting, and the answer to that could well be the answer to your question on caching ScriptResources.