Wednesday, March 21, 2012

Atlas script files

I have page, which shouldn't be cached. So, I have the following statement on my page_load event:

Response.Cache.SetCacheability(

HttpCacheability.NoCache);

As it seems is that also all atlas script is not cached on the client because of that.
Is there any workaround?

I'm using only update panel on my page. How can I reduce the size of atlas script to only those needed for update panel?

I have 2 updatePanels on my page and because of that, page generates 2 axd script files:

WebResource.axd
WebResource1.axd

Can I reduce that?

Thank you for your answers,

Simon

Actually, the behavior you are observing is the most optimal way possible to handle things when it comes to the UpdatePanel. Because the references to the necessary scripts are linked using the Web Resource method, the browser will cache the content obtained from those .axd resources by default (I am sure you can change this on most browsers if you want). This will occur whether you are caching content on the server or not.

In addition, the script returned from those web resource URL's are optimized for minimal size in transmission, so there is not really anything more to do as an optimization other than to using similar methods to customize your own Javascript to accomplish the same tasks.


In my experience, the browser (IE6) does not cache the Atlas scriptfiles which are retrieved using the WebResource method. When I retrieve an Atlas driven page, all Atlas AXD files are downloaded, When I retrieve this Atlas page again (using the same hyperlink), the files are downloaded again. Because of the filesizes, the page loads very slow on low bandwith lines.

Does anybody have a clue how to use the browser cache for the Atlas files, so the only have to be loaded one time?

Regards, Ad


Hi,

areijngoudt, did you check if debug="false" in your web.config? Having debug="true" prevents web resources from being cached in the browser.

No comments:

Post a Comment