HighTechTalks DotNet Forums  

How to avoid repeated downloading of .xsl files?

ASP.net Caching microsoft.public.dotnet.framework.aspnet.caching


Discuss How to avoid repeated downloading of .xsl files? in the ASP.net Caching forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Rahul Agarwal
 
Posts: n/a

Default How to avoid repeated downloading of .xsl files? - 06-28-2005 , 09:04 PM






Hi

We are heavily using .xsl for client-side transformation and these files are
always downloaded with every request to a page. Is it possible to some how
cache these files on the client side like any other files (for e.g. .js,
..img files) so that it dosent gets downloaded everytime.

Please advise
Rahul



Reply With Quote
  #2  
Old   
Joerg Jooss
 
Posts: n/a

Default Re: How to avoid repeated downloading of .xsl files? - 07-01-2005 , 03:47 AM






Rahul Agarwal wrote:

Quote:
Hi

We are heavily using .xsl for client-side transformation and these
files are always downloaded with every request to a page. Is it
possible to some how cache these files on the client side like any
other files (for e.g. .js, .img files) so that it dosent gets
downloaded everytime.
Sure. Simply mark the files as cacheable in your web server using
appropriate HTTP caching headers, e.g.

Cache-Control: public, max-age=86400

(any cache may store the XSL and consider it fresh for 86400 seconds,
i.e. one day)

Note that in IIS you can only set headers per directory, in which case
you'll need to put all your XSL files in a common directory and set the
desired HTTP headers for this directory.

Cheers,
--
http://www.joergjooss.de
mailto:news-reply (AT) joergjooss (DOT) de


Reply With Quote
  #3  
Old   
Rahul Agarwal
 
Posts: n/a

Default Re: How to avoid repeated downloading of .xsl files? - 07-03-2005 , 08:09 PM



Hi Joerg

Thanks for the reply. However I am still unable to cache the .xsl files even
after adding the header you suggested. I think the problem is IIS is sending
a header "Pragma: no-cache", do you know how I can remove this header. I
can't seem to find this header being explicitly added on the .xsl
files/directory.

Please advice
Thanks
rahul

"Joerg Jooss" <news-reply (AT) joergjooss (DOT) de> wrote

Quote:
Rahul Agarwal wrote:

Hi

We are heavily using .xsl for client-side transformation and these
files are always downloaded with every request to a page. Is it
possible to some how cache these files on the client side like any
other files (for e.g. .js, .img files) so that it dosent gets
downloaded everytime.

Sure. Simply mark the files as cacheable in your web server using
appropriate HTTP caching headers, e.g.

Cache-Control: public, max-age=86400

(any cache may store the XSL and consider it fresh for 86400 seconds,
i.e. one day)

Note that in IIS you can only set headers per directory, in which case
you'll need to put all your XSL files in a common directory and set the
desired HTTP headers for this directory.

Cheers,
--
http://www.joergjooss.de
mailto:news-reply (AT) joergjooss (DOT) de



Reply With Quote
  #4  
Old   
Joerg Jooss
 
Posts: n/a

Default Re: How to avoid repeated downloading of .xsl files? - 07-04-2005 , 03:50 PM



Rahul Agarwal wrote:

Quote:
Hi Joerg

Thanks for the reply. However I am still unable to cache the .xsl
files even after adding the header you suggested. I think the problem
is IIS is sending a header "Pragma: no-cache", do you know how I can
remove this header. I can't seem to find this header being explicitly
added on the .xsl files/directory.

Are you sure it's set by IIS? I don't think so. Also note that Pragma:
no-cache is a meaningless for properly implemented HTTP 1.1 clients.

Cheers,
--
http://www.joergjooss.de
mailto:news-reply (AT) joergjooss (DOT) de


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.